From 23873361d9d7bf883603ede267c238053850e8a4 Mon Sep 17 00:00:00 2001 From: agentHits <140916359+agentHits@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:43:34 +0300 Subject: [PATCH] feat: expose deployment log reader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Что: - синхронизированы generated Dokploy OpenAPI tools с текущим upstream spec, включая `deployment-readLogs`; - обновлена generated tools documentation; - добавлены regression tests для `tools/list` и `tools/call` маршрутизации `deployment-readLogs`. Зачем: - MCP clients смогут читать deployment logs для вручную запущенных schedule runs и сохранять command output как audit evidence. Риски: - live Dokploy schedule execution не проверялся, потому что реальный instance, secrets и infrastructure не использовались. Проверки: - Команды и результаты: `corepack pnpm exec vitest run src/server.test.ts --reporter=verbose` прошел, 1 file / 6 tests; `corepack pnpm run lint` прошел с одним существующим warning в `src/utils/responseFormatter.ts`; `corepack pnpm run type-check` прошел; `corepack pnpm run test` прошел, 3 files / 27 tests; `corepack pnpm run build` прошел; `git diff --check` прошел; independent Agent Flow QA вернул pass. - Ограничения: live Dokploy API schedule log retrieval не проверялся. What: - synchronized generated Dokploy OpenAPI tools with the current upstream spec, including `deployment-readLogs`; - updated the generated tools documentation; - added regression tests for `tools/list` exposure and `tools/call` routing for `deployment-readLogs`. Why: - MCP clients can read deployment logs for manually triggered schedule runs and capture command output as audit evidence. Risks: - live Dokploy schedule execution was not tested because no real instance, secrets, or infrastructure were used. Checks: - Commands and results: `corepack pnpm exec vitest run src/server.test.ts --reporter=verbose` passed, 1 file / 6 tests; `corepack pnpm run lint` passed with one existing warning in `src/utils/responseFormatter.ts`; `corepack pnpm run type-check` passed; `corepack pnpm run test` passed, 3 files / 27 tests; `corepack pnpm run build` passed; `git diff --check` passed; independent Agent Flow QA returned pass. - Limitations: live Dokploy API schedule log retrieval was not exercised. Closes #53 --- TOOLS.md | 59 +- src/generated/openapi.json | 3940 +++++++++++++++++++++++++----------- src/generated/tools.ts | 228 ++- src/server.test.ts | 102 +- 4 files changed, 3091 insertions(+), 1238 deletions(-) diff --git a/TOOLS.md b/TOOLS.md index fa69db1..3ac097a 100644 --- a/TOOLS.md +++ b/TOOLS.md @@ -2,8 +2,8 @@ > Auto-generated from the [Dokploy OpenAPI spec](https://docs.dokploy.com/openapi.json). Run `pnpm generate` to update. -- **Total Tools**: 524 -- **Categories**: 48 +- **Total Tools**: 541 +- **Categories**: 49 ## Categories @@ -15,13 +15,14 @@ - [bitbucket](#bitbucket) (7 tools) - [certificates](#certificates) (5 tools) - [cluster](#cluster) (4 tools) -- [compose](#compose) (30 tools) +- [compose](#compose) (31 tools) - [customRole](#customRole) (6 tools) -- [deployment](#deployment) (8 tools) +- [deployment](#deployment) (9 tools) - [destination](#destination) (6 tools) - [docker](#docker) (12 tools) - [domain](#domain) (9 tools) - [environment](#environment) (7 tools) +- [forwardAuth](#forwardAuth) (10 tools) - [gitea](#gitea) (8 tools) - [github](#github) (6 tools) - [gitlab](#gitlab) (7 tools) @@ -45,10 +46,10 @@ - [rollback](#rollback) (2 tools) - [schedule](#schedule) (6 tools) - [security](#security) (4 tools) -- [server](#server) (17 tools) -- [settings](#settings) (51 tools) +- [server](#server) (18 tools) +- [settings](#settings) (54 tools) - [sshKey](#sshKey) (7 tools) -- [sso](#sso) (10 tools) +- [sso](#sso) (11 tools) - [stripe](#stripe) (8 tools) - [swarm](#swarm) (4 tools) - [tag](#tag) (8 tools) @@ -92,12 +93,12 @@ | `application-redeploy` | POST | `applicationId` (string), `title`?, `description`? | | `application-saveEnvironment` | POST | `applicationId` (string), `env` (string | null), `buildArgs` (string | null), `buildSecrets` (string | null), `createEnvFile` (boolean) | | `application-saveBuildType` | POST | `applicationId` (string), `buildType` ("dockerfile" | "heroku_buildpacks" | "paketo_buildpacks" | "nixpacks" | "static" | "railpack"), `dockerfile` (string | null), `dockerContextPath` (string | null), `dockerBuildStage` (string | null), `herokuVersion` (string | null), `railpackVersion` (string | null), `publishDirectory`?, `isStaticSpa`? | -| `application-saveGithubProvider` | POST | `applicationId` (string), `repository` (string | null), `branch` (string | null), `owner` (string | null), `buildPath` (string | null), `githubId` (string | null), `triggerType` ("push" | "tag"), `enableSubmodules`?, `watchPaths`? | -| `application-saveGitlabProvider` | POST | `applicationId` (string), `gitlabBranch` (string | null), `gitlabBuildPath` (string | null), `gitlabOwner` (string | null), `gitlabRepository` (string | null), `gitlabId` (string | null), `gitlabProjectId` (number | null), `gitlabPathNamespace` (string | null), `enableSubmodules`?, `watchPaths`? | -| `application-saveBitbucketProvider` | POST | `bitbucketBranch` (string | null), `bitbucketBuildPath` (string | null), `bitbucketOwner` (string | null), `bitbucketRepository` (string | null), `bitbucketRepositorySlug` (string | null), `bitbucketId` (string | null), `applicationId` (string), `enableSubmodules`?, `watchPaths`? | -| `application-saveGiteaProvider` | POST | `applicationId` (string), `giteaBranch` (string | null), `giteaBuildPath` (string | null), `giteaOwner` (string | null), `giteaRepository` (string | null), `giteaId` (string | null), `enableSubmodules`?, `watchPaths`? | +| `application-saveGithubProvider` | POST | `applicationId` (string), `repository` (string | null), `owner` (string | null), `buildPath` (string | null), `githubId` (string | null), `branch` (string), `triggerType` ("push" | "tag"), `enableSubmodules`?, `watchPaths`? | +| `application-saveGitlabProvider` | POST | `applicationId` (string), `gitlabBuildPath` (string | null), `gitlabOwner` (string | null), `gitlabRepository` (string | null), `gitlabId` (string | null), `gitlabProjectId` (number | null), `gitlabPathNamespace` (string | null), `gitlabBranch` (string), `enableSubmodules`?, `watchPaths`? | +| `application-saveBitbucketProvider` | POST | `bitbucketBuildPath` (string | null), `bitbucketOwner` (string | null), `bitbucketRepository` (string | null), `bitbucketRepositorySlug` (string | null), `bitbucketId` (string | null), `applicationId` (string), `bitbucketBranch` (string), `enableSubmodules`?, `watchPaths`? | +| `application-saveGiteaProvider` | POST | `applicationId` (string), `giteaBuildPath` (string | null), `giteaOwner` (string | null), `giteaRepository` (string | null), `giteaId` (string | null), `giteaBranch` (string), `enableSubmodules`?, `watchPaths`? | | `application-saveDockerProvider` | POST | `dockerImage` (string | null), `applicationId` (string), `username` (string | null), `password` (string | null), `registryUrl` (string | null) | -| `application-saveGitProvider` | POST | `customGitBranch` (string | null), `applicationId` (string), `customGitBuildPath` (string | null), `customGitUrl` (string | null), `watchPaths` (array | null), `enableSubmodules`?, `customGitSSHKeyId`? | +| `application-saveGitProvider` | POST | `applicationId` (string), `customGitBuildPath` (string | null), `customGitUrl` (string | null), `watchPaths` (array | null), `customGitBranch` (string), `enableSubmodules`?, `customGitSSHKeyId`? | | `application-disconnectGitProvider` | POST | `applicationId` (string) | | `application-markRunning` | POST | `applicationId` (string) | | `application-update` | POST | `applicationId` (string), +97 optional | @@ -199,6 +200,7 @@ | `compose-disconnectGitProvider` | POST | `composeId` (string) | | `compose-move` | POST | `composeId` (string), `targetEnvironmentId` (string) | | `compose-processTemplate` | POST | `base64` (string), `composeId` (string) | +| `compose-previewTemplate` | POST | `base64` (string), `appName` (string), `serverId`? | | `compose-import` | POST | `base64` (string), `composeId` (string) | | `compose-cancelDeployment` | POST | `composeId` (string) | | `compose-search` | GET | +8 optional | @@ -227,6 +229,7 @@ | `deployment-allByType` | GET | `id` (string), `type` ("application" | "compose" | "server" | "schedule" | "previewDeployment" | "backup" | "volumeBackup") | | `deployment-killProcess` | POST | `deploymentId` (string) | | `deployment-removeDeployment` | POST | `deploymentId` (string) | +| `deployment-readLogs` | GET | `deploymentId` (string), `tail`? | ## destination @@ -260,12 +263,12 @@ | Tool | Method | Parameters | |------|--------|------------| -| `domain-create` | POST | `host` (string), +14 optional | +| `domain-create` | POST | `host` (string), +15 optional | | `domain-byApplicationId` | GET | `applicationId` (string) | | `domain-byComposeId` | GET | `composeId` (string) | | `domain-generateDomain` | POST | `appName` (string), `serverId`? | | `domain-canGenerateTraefikMeDomains` | GET | `serverId` (string) | -| `domain-update` | POST | `host` (string), `domainId` (string), +11 optional | +| `domain-update` | POST | `host` (string), `domainId` (string), +12 optional | | `domain-one` | GET | `domainId` (string) | | `domain-delete` | POST | `domainId` (string) | | `domain-validateDomain` | POST | `domain` (string), `serverIp`? | @@ -282,6 +285,21 @@ | `environment-duplicate` | POST | `environmentId` (string), `name` (string), `description`? | | `environment-search` | GET | +6 optional | +## forwardAuth + +| Tool | Method | Parameters | +|------|--------|------------| +| `forwardAuth-getAuthDomain` | GET | `serverId` (string | null) | +| `forwardAuth-setAuthDomain` | POST | `serverId` (string | null), `authDomain` (string), `https`?, `certificateType`?, `customCertResolver`? | +| `forwardAuth-removeAuthDomain` | POST | `serverId` (string | null) | +| `forwardAuth-listProviders` | GET | None | +| `forwardAuth-serverStatus` | GET | None | +| `forwardAuth-deployOnServer` | POST | `serverId` (string | null), `providerId` (string) | +| `forwardAuth-removeOnServer` | POST | `serverId` (string | null) | +| `forwardAuth-status` | GET | `domainId` (string) | +| `forwardAuth-enable` | POST | `domainId` (string) | +| `forwardAuth-disable` | POST | `domainId` (string) | + ## gitea | Tool | Method | Parameters | @@ -616,8 +634,8 @@ | Tool | Method | Parameters | |------|--------|------------| -| `schedule-create` | POST | `name` (string), `cronExpression` (string), `command` (string), +13 optional | -| `schedule-update` | POST | `scheduleId` (string), `name` (string), `cronExpression` (string), `command` (string), +12 optional | +| `schedule-create` | POST | `name` (string), `cronExpression` (string), `command` (string), +14 optional | +| `schedule-update` | POST | `scheduleId` (string), `name` (string), `cronExpression` (string), `command` (string), +13 optional | | `schedule-delete` | POST | `scheduleId` (string) | | `schedule-list` | GET | `id` (string), `scheduleType` ("application" | "compose" | "server" | "dokploy-server") | | `schedule-one` | GET | `scheduleId` (string) | @@ -636,7 +654,7 @@ | Tool | Method | Parameters | |------|--------|------------| -| `server-create` | POST | `name` (string), `description` (string | null), `ipAddress` (string), `port` (number), `username` (string), `sshKeyId` (string | null), `serverType` ("deploy" | "build") | +| `server-create` | POST | `name` (string), `description` (string | null), `ipAddress` (string), `port` (number), `username` (string), `sshKeyId` (string | null), `serverType` ("deploy" | "build"), `enableDockerCleanup`? | | `server-one` | GET | `serverId` (string) | | `server-getDefaultCommand` | GET | `serverId` (string) | | `server-all` | GET | None | @@ -649,7 +667,8 @@ | `server-security` | GET | `serverId` (string) | | `server-setupMonitoring` | POST | `serverId` (string), `metricsConfig` (object) | | `server-remove` | POST | `serverId` (string) | -| `server-update` | POST | `name` (string), `description` (string | null), `serverId` (string), `ipAddress` (string), `port` (number), `username` (string), `sshKeyId` (string | null), `serverType` ("deploy" | "build"), `command`? | +| `server-update` | POST | `name` (string), `description` (string | null), `serverId` (string), `ipAddress` (string), `port` (number), `username` (string), `sshKeyId` (string | null), `serverType` ("deploy" | "build"), `enableDockerCleanup`?, `command`? | +| `server-updateBuildsConcurrency` | POST | `serverId` (string), `buildsConcurrency` (integer) | | `server-publicIp` | GET | None | | `server-getServerTime` | GET | None | | `server-getServerMetrics` | GET | `url` (string), `token` (string), `dataPoints` (string) | @@ -677,6 +696,9 @@ | `settings-assignDomainServer` | POST | `host` (string), `certificateType` ("letsencrypt" | "none" | "custom"), `letsEncryptEmail`?, `https`? | | `settings-cleanSSHPrivateKey` | POST | None | | `settings-updateDockerCleanup` | POST | `enableDockerCleanup` (boolean), `serverId`? | +| `settings-updateRemoteServersOnly` | POST | `remoteServersOnly` (boolean) | +| `settings-updateBuildsConcurrency` | POST | `buildsConcurrency` (integer) | +| `settings-updateEnforceSSO` | POST | `enforceSSO` (boolean) | | `settings-readTraefikConfig` | GET | None | | `settings-updateTraefikConfig` | POST | `traefikConfig` (string) | | `settings-readWebServerTraefikConfig` | GET | None | @@ -727,6 +749,7 @@ | Tool | Method | Parameters | |------|--------|------------| | `sso-showSignInWithSSO` | GET | None | +| `sso-enforceSSO` | GET | None | | `sso-listProviders` | GET | None | | `sso-getTrustedOrigins` | GET | None | | `sso-one` | GET | `providerId` (string) | diff --git a/src/generated/openapi.json b/src/generated/openapi.json index 9a33316..b1b7b3d 100644 --- a/src/generated/openapi.json +++ b/src/generated/openapi.json @@ -1292,16 +1292,6 @@ } ] }, - "branch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "owner": { "anyOf": [ { @@ -1332,6 +1322,11 @@ } ] }, + "branch": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9._\\-/]+$" + }, "triggerType": { "default": "push", "type": "string", @@ -1360,10 +1355,10 @@ "required": [ "applicationId", "repository", - "branch", "owner", "buildPath", "githubId", + "branch", "triggerType" ] } @@ -1448,16 +1443,6 @@ "applicationId": { "type": "string" }, - "gitlabBranch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "gitlabBuildPath": { "anyOf": [ { @@ -1518,6 +1503,11 @@ } ] }, + "gitlabBranch": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9._\\-/]+$" + }, "enableSubmodules": { "type": "boolean" }, @@ -1537,13 +1527,13 @@ }, "required": [ "applicationId", - "gitlabBranch", "gitlabBuildPath", "gitlabOwner", "gitlabRepository", "gitlabId", "gitlabProjectId", - "gitlabPathNamespace" + "gitlabPathNamespace", + "gitlabBranch" ] } } @@ -1624,16 +1614,6 @@ "schema": { "type": "object", "properties": { - "bitbucketBranch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "bitbucketBuildPath": { "anyOf": [ { @@ -1687,6 +1667,11 @@ "applicationId": { "type": "string" }, + "bitbucketBranch": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9._\\-/]+$" + }, "enableSubmodules": { "type": "boolean" }, @@ -1705,13 +1690,13 @@ } }, "required": [ - "bitbucketBranch", "bitbucketBuildPath", "bitbucketOwner", "bitbucketRepository", "bitbucketRepositorySlug", "bitbucketId", - "applicationId" + "applicationId", + "bitbucketBranch" ] } } @@ -1795,16 +1780,6 @@ "applicationId": { "type": "string" }, - "giteaBranch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "giteaBuildPath": { "anyOf": [ { @@ -1845,6 +1820,11 @@ } ] }, + "giteaBranch": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9._\\-/]+$" + }, "enableSubmodules": { "type": "boolean" }, @@ -1864,11 +1844,11 @@ }, "required": [ "applicationId", - "giteaBranch", "giteaBuildPath", "giteaOwner", "giteaRepository", - "giteaId" + "giteaId", + "giteaBranch" ] } } @@ -2079,16 +2059,6 @@ "schema": { "type": "object", "properties": { - "customGitBranch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, "applicationId": { "type": "string" }, @@ -2128,6 +2098,11 @@ "enableSubmodules": { "type": "boolean" }, + "customGitBranch": { + "type": "string", + "minLength": 1, + "pattern": "^[a-zA-Z0-9._\\-/]+$" + }, "customGitSSHKeyId": { "anyOf": [ { @@ -2140,11 +2115,11 @@ } }, "required": [ - "customGitBranch", "applicationId", "customGitBuildPath", "customGitUrl", - "watchPaths" + "watchPaths", + "customGitBranch" ] } } @@ -10504,6 +10479,99 @@ } } }, + "/compose.previewTemplate": { + "post": { + "operationId": "compose-previewTemplate", + "tags": [ + "compose" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "base64": { + "type": "string" + }, + "appName": { + "type": "string" + }, + "serverId": { + "type": "string" + } + }, + "required": [ + "base64", + "appName" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, "/compose.import": { "post": { "operationId": "compose-import", @@ -11644,87 +11712,185 @@ } } }, - "/destination.create": { - "post": { - "operationId": "destination-create", + "/deployment.readLogs": { + "get": { + "operationId": "deployment-readLogs", "tags": [ - "destination" + "deployment" ], "security": [ { "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "accessKey": { - "type": "string" - }, - "bucket": { - "type": "string" - }, - "region": { - "type": "string" - }, - "endpoint": { - "type": "string" - }, - "secretAccessKey": { - "type": "string" - }, - "additionalFlags": { - "anyOf": [ - { - "default": [], - "type": "array", - "items": { - "type": "string", - "pattern": "^--[a-zA-Z0-9-]+(=[a-zA-Z0-9._:/@-]+)?$" - } - }, - { - "type": "null" - } - ] - }, - "serverId": { - "type": "string" - } - }, - "required": [ - "name", - "provider", - "accessKey", - "bucket", - "region", - "endpoint", - "secretAccessKey", - "additionalFlags" - ] - } + "parameters": [ + { + "in": "query", + "name": "deploymentId", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + }, + { + "in": "query", + "name": "tail", + "schema": { + "default": 100, + "type": "integer", + "minimum": 1, + "maximum": 10000 } } - }, + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/destination.create": { + "post": { + "operationId": "destination-create", + "tags": [ + "destination" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "accessKey": { + "type": "string" + }, + "bucket": { + "type": "string" + }, + "region": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "secretAccessKey": { + "type": "string" + }, + "additionalFlags": { + "anyOf": [ + { + "default": [], + "type": "array", + "items": { + "type": "string", + "pattern": "^--[a-zA-Z0-9-]+(=[a-zA-Z0-9._:/@-]+)?$" + } + }, + { + "type": "null" + } + ] + }, + "serverId": { + "type": "string" + } + }, + "required": [ + "name", + "provider", + "accessKey", + "bucket", + "region", + "endpoint", + "secretAccessKey", + "additionalFlags" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -13384,7 +13550,8 @@ }, "destinationPath": { "type": "string", - "minLength": 1 + "minLength": 1, + "pattern": "^[a-zA-Z0-9.\\-_/]+$" }, "serverId": { "type": "string" @@ -13612,6 +13779,9 @@ "type": "null" } ] + }, + "forwardAuthEnabled": { + "type": "boolean" } }, "required": [ @@ -14157,6 +14327,9 @@ } ] }, + "forwardAuthEnabled": { + "type": "boolean" + }, "domainId": { "type": "string" } @@ -38264,6 +38437,10 @@ "deploy", "build" ] + }, + "enableDockerCleanup": { + "default": true, + "type": "boolean" } }, "required": [ @@ -39490,6 +39667,10 @@ "build" ] }, + "enableDockerCleanup": { + "default": true, + "type": "boolean" + }, "command": { "type": "string" } @@ -39564,9 +39745,9 @@ } } }, - "/server.publicIp": { - "get": { - "operationId": "server-publicIp", + "/server.updateBuildsConcurrency": { + "post": { + "operationId": "server-updateBuildsConcurrency", "tags": [ "server" ], @@ -39575,83 +39756,176 @@ "x-api-key": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string", + "minLength": 1 + }, + "buildsConcurrency": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "serverId", + "buildsConcurrency" + ] } } } - } - } - }, - "/server.getServerTime": { - "get": { - "operationId": "server-getServerTime", - "tags": [ - "server" - ], - "security": [ - { - "x-api-key": [] - } - ], + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/server.publicIp": { + "get": { + "operationId": "server-publicIp", + "tags": [ + "server" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/server.getServerTime": { + "get": { + "operationId": "server-getServerTime", + "tags": [ + "server" + ], + "security": [ + { + "x-api-key": [] + } + ], "responses": { "200": { "description": "Successful response", @@ -41337,9 +41611,9 @@ } } }, - "/settings.readTraefikConfig": { - "get": { - "operationId": "settings-readTraefikConfig", + "/settings.updateRemoteServersOnly": { + "post": { + "operationId": "settings-updateRemoteServersOnly", "tags": [ "settings" ], @@ -41348,6 +41622,25 @@ "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "remoteServersOnly": { + "type": "boolean" + } + }, + "required": [ + "remoteServersOnly" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -41391,12 +41684,90 @@ } } }, - "404": { - "description": "Not found", + "500": { + "description": "Internal server error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/settings.updateBuildsConcurrency": { + "post": { + "operationId": "settings-updateBuildsConcurrency", + "tags": [ + "settings" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "buildsConcurrency": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + }, + "required": [ + "buildsConcurrency" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" } } } @@ -41414,9 +41785,9 @@ } } }, - "/settings.updateTraefikConfig": { + "/settings.updateEnforceSSO": { "post": { - "operationId": "settings-updateTraefikConfig", + "operationId": "settings-updateEnforceSSO", "tags": [ "settings" ], @@ -41433,13 +41804,12 @@ "schema": { "type": "object", "properties": { - "traefikConfig": { - "type": "string", - "minLength": 1 + "enforceSSO": { + "type": "boolean" } }, "required": [ - "traefikConfig" + "enforceSSO" ] } } @@ -41501,9 +41871,9 @@ } } }, - "/settings.readWebServerTraefikConfig": { + "/settings.readTraefikConfig": { "get": { - "operationId": "settings-readWebServerTraefikConfig", + "operationId": "settings-readTraefikConfig", "tags": [ "settings" ], @@ -41578,9 +41948,9 @@ } } }, - "/settings.updateWebServerTraefikConfig": { + "/settings.updateTraefikConfig": { "post": { - "operationId": "settings-updateWebServerTraefikConfig", + "operationId": "settings-updateTraefikConfig", "tags": [ "settings" ], @@ -41665,9 +42035,9 @@ } } }, - "/settings.readMiddlewareTraefikConfig": { + "/settings.readWebServerTraefikConfig": { "get": { - "operationId": "settings-readMiddlewareTraefikConfig", + "operationId": "settings-readWebServerTraefikConfig", "tags": [ "settings" ], @@ -41742,9 +42112,9 @@ } } }, - "/settings.updateMiddlewareTraefikConfig": { + "/settings.updateWebServerTraefikConfig": { "post": { - "operationId": "settings-updateMiddlewareTraefikConfig", + "operationId": "settings-updateWebServerTraefikConfig", "tags": [ "settings" ], @@ -41829,143 +42199,9 @@ } } }, - "/settings.getUpdateData": { - "post": { - "operationId": "settings-getUpdateData", - "tags": [ - "settings" - ], - "security": [ - { - "x-api-key": [] - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/settings.updateServer": { - "post": { - "operationId": "settings-updateServer", - "tags": [ - "settings" - ], - "security": [ - { - "x-api-key": [] - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/settings.getDokployVersion": { + "/settings.readMiddlewareTraefikConfig": { "get": { - "operationId": "settings-getDokployVersion", + "operationId": "settings-readMiddlewareTraefikConfig", "tags": [ "settings" ], @@ -42040,9 +42276,9 @@ } } }, - "/settings.getReleaseTag": { - "get": { - "operationId": "settings-getReleaseTag", + "/settings.updateMiddlewareTraefikConfig": { + "post": { + "operationId": "settings-updateMiddlewareTraefikConfig", "tags": [ "settings" ], @@ -42051,6 +42287,26 @@ "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "traefikConfig": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "traefikConfig" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -42094,16 +42350,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -42117,9 +42363,9 @@ } } }, - "/settings.readDirectories": { - "get": { - "operationId": "settings-readDirectories", + "/settings.getUpdateData": { + "post": { + "operationId": "settings-getUpdateData", "tags": [ "settings" ], @@ -42128,15 +42374,6 @@ "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -42180,16 +42417,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -42203,9 +42430,9 @@ } } }, - "/settings.updateTraefikFile": { + "/settings.updateServer": { "post": { - "operationId": "settings-updateTraefikFile", + "operationId": "settings-updateServer", "tags": [ "settings" ], @@ -42214,34 +42441,6 @@ "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "path": { - "type": "string", - "minLength": 1 - }, - "traefikConfig": { - "type": "string", - "minLength": 1 - }, - "serverId": { - "type": "string" - } - }, - "required": [ - "path", - "traefikConfig" - ] - } - } - } - }, "responses": { "200": { "description": "Successful response", @@ -42298,9 +42497,9 @@ } } }, - "/settings.readTraefikFile": { + "/settings.getDokployVersion": { "get": { - "operationId": "settings-readTraefikFile", + "operationId": "settings-getDokployVersion", "tags": [ "settings" ], @@ -42309,24 +42508,6 @@ "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "path", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true - }, - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -42393,172 +42574,9 @@ } } }, - "/settings.getIp": { - "get": { - "operationId": "settings-getIp", - "tags": [ - "settings" - ], - "security": [ - { - "x-api-key": [] - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/settings.updateServerIp": { - "post": { - "operationId": "settings-updateServerIp", - "tags": [ - "settings" - ], - "security": [ - { - "x-api-key": [] - } - ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "serverIp": { - "type": "string" - } - }, - "required": [ - "serverIp" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/settings.getOpenApiDocument": { + "/settings.getReleaseTag": { "get": { - "operationId": "settings-getOpenApiDocument", + "operationId": "settings-getReleaseTag", "tags": [ "settings" ], @@ -42633,9 +42651,9 @@ } } }, - "/settings.readTraefikEnv": { + "/settings.readDirectories": { "get": { - "operationId": "settings-readTraefikEnv", + "operationId": "settings-readDirectories", "tags": [ "settings" ], @@ -42719,9 +42737,9 @@ } } }, - "/settings.writeTraefikEnv": { + "/settings.updateTraefikFile": { "post": { - "operationId": "settings-writeTraefikEnv", + "operationId": "settings-updateTraefikFile", "tags": [ "settings" ], @@ -42738,15 +42756,21 @@ "schema": { "type": "object", "properties": { - "env": { - "type": "string" + "path": { + "type": "string", + "minLength": 1 + }, + "traefikConfig": { + "type": "string", + "minLength": 1 }, "serverId": { "type": "string" } }, "required": [ - "env" + "path", + "traefikConfig" ] } } @@ -42808,9 +42832,9 @@ } } }, - "/settings.haveTraefikDashboardPortEnabled": { + "/settings.readTraefikFile": { "get": { - "operationId": "settings-haveTraefikDashboardPortEnabled", + "operationId": "settings-readTraefikFile", "tags": [ "settings" ], @@ -42820,6 +42844,15 @@ } ], "parameters": [ + { + "in": "query", + "name": "path", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + }, { "in": "query", "name": "serverId", @@ -42894,9 +42927,9 @@ } } }, - "/settings.haveActivateRequests": { + "/settings.getIp": { "get": { - "operationId": "settings-haveActivateRequests", + "operationId": "settings-getIp", "tags": [ "settings" ], @@ -42971,9 +43004,9 @@ } } }, - "/settings.toggleRequests": { + "/settings.updateServerIp": { "post": { - "operationId": "settings-toggleRequests", + "operationId": "settings-updateServerIp", "tags": [ "settings" ], @@ -42990,12 +43023,12 @@ "schema": { "type": "object", "properties": { - "enable": { - "type": "boolean" + "serverIp": { + "type": "string" } }, "required": [ - "enable" + "serverIp" ] } } @@ -43057,9 +43090,9 @@ } } }, - "/settings.isCloud": { + "/settings.getOpenApiDocument": { "get": { - "operationId": "settings-isCloud", + "operationId": "settings-getOpenApiDocument", "tags": [ "settings" ], @@ -43134,9 +43167,9 @@ } } }, - "/settings.isUserSubscribed": { + "/settings.readTraefikEnv": { "get": { - "operationId": "settings-isUserSubscribed", + "operationId": "settings-readTraefikEnv", "tags": [ "settings" ], @@ -43145,6 +43178,15 @@ "x-api-key": [] } ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -43211,9 +43253,9 @@ } } }, - "/settings.health": { - "get": { - "operationId": "settings-health", + "/settings.writeTraefikEnv": { + "post": { + "operationId": "settings-writeTraefikEnv", "tags": [ "settings" ], @@ -43222,6 +43264,104 @@ "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "env": { + "type": "string" + }, + "serverId": { + "type": "string" + } + }, + "required": [ + "env" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/settings.haveTraefikDashboardPortEnabled": { + "get": { + "operationId": "settings-haveTraefikDashboardPortEnabled", + "tags": [ + "settings" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -43288,9 +43428,9 @@ } } }, - "/settings.checkInfrastructureHealth": { + "/settings.haveActivateRequests": { "get": { - "operationId": "settings-checkInfrastructureHealth", + "operationId": "settings-haveActivateRequests", "tags": [ "settings" ], @@ -43365,9 +43505,9 @@ } } }, - "/settings.setupGPU": { + "/settings.toggleRequests": { "post": { - "operationId": "settings-setupGPU", + "operationId": "settings-toggleRequests", "tags": [ "settings" ], @@ -43384,10 +43524,13 @@ "schema": { "type": "object", "properties": { - "serverId": { - "type": "string" + "enable": { + "type": "boolean" } - } + }, + "required": [ + "enable" + ] } } } @@ -43448,9 +43591,9 @@ } } }, - "/settings.checkGPUStatus": { + "/settings.isCloud": { "get": { - "operationId": "settings-checkGPUStatus", + "operationId": "settings-isCloud", "tags": [ "settings" ], @@ -43459,15 +43602,6 @@ "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -43534,9 +43668,9 @@ } } }, - "/settings.updateTraefikPorts": { - "post": { - "operationId": "settings-updateTraefikPorts", + "/settings.isUserSubscribed": { + "get": { + "operationId": "settings-isUserSubscribed", "tags": [ "settings" ], @@ -43545,52 +43679,6 @@ "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "serverId": { - "type": "string" - }, - "additionalPorts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "targetPort": { - "type": "number" - }, - "publishedPort": { - "type": "number" - }, - "protocol": { - "type": "string", - "enum": [ - "tcp", - "udp", - "sctp" - ] - } - }, - "required": [ - "targetPort", - "publishedPort", - "protocol" - ] - } - } - }, - "required": [ - "additionalPorts" - ] - } - } - } - }, "responses": { "200": { "description": "Successful response", @@ -43634,6 +43722,16 @@ } } }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, "500": { "description": "Internal server error", "content": { @@ -43647,9 +43745,9 @@ } } }, - "/settings.getTraefikPorts": { + "/settings.health": { "get": { - "operationId": "settings-getTraefikPorts", + "operationId": "settings-health", "tags": [ "settings" ], @@ -43658,15 +43756,6 @@ "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -43733,9 +43822,9 @@ } } }, - "/settings.updateLogCleanup": { - "post": { - "operationId": "settings-updateLogCleanup", + "/settings.checkInfrastructureHealth": { + "get": { + "operationId": "settings-checkInfrastructureHealth", "tags": [ "settings" ], @@ -43744,32 +43833,6 @@ "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cronExpression": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "cronExpression" - ] - } - } - } - }, "responses": { "200": { "description": "Successful response", @@ -43813,6 +43876,16 @@ } } }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, "500": { "description": "Internal server error", "content": { @@ -43826,9 +43899,9 @@ } } }, - "/settings.getLogCleanupStatus": { - "get": { - "operationId": "settings-getLogCleanupStatus", + "/settings.setupGPU": { + "post": { + "operationId": "settings-setupGPU", "tags": [ "settings" ], @@ -43837,6 +43910,22 @@ "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "type": "string" + } + } + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -43880,16 +43969,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -43903,9 +43982,9 @@ } } }, - "/settings.getDokployCloudIps": { + "/settings.checkGPUStatus": { "get": { - "operationId": "settings-getDokployCloudIps", + "operationId": "settings-checkGPUStatus", "tags": [ "settings" ], @@ -43914,6 +43993,15 @@ "x-api-key": [] } ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -43980,11 +44068,11 @@ } } }, - "/sshKey.create": { + "/settings.updateTraefikPorts": { "post": { - "operationId": "sshKey-create", + "operationId": "settings-updateTraefikPorts", "tags": [ - "sshKey" + "settings" ], "security": [ { @@ -43999,35 +44087,39 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "privateKey": { - "type": "string" - }, - "publicKey": { + "serverId": { "type": "string" }, - "organizationId": { - "type": "string" + "additionalPorts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "targetPort": { + "type": "number" + }, + "publishedPort": { + "type": "number" + }, + "protocol": { + "type": "string", + "enum": [ + "tcp", + "udp", + "sctp" + ] + } + }, + "required": [ + "targetPort", + "publishedPort", + "protocol" + ] + } } }, "required": [ - "name", - "privateKey", - "publicKey", - "organizationId" + "additionalPorts" ] } } @@ -44089,11 +44181,97 @@ } } }, - "/sshKey.remove": { + "/settings.getTraefikPorts": { + "get": { + "operationId": "settings-getTraefikPorts", + "tags": [ + "settings" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/settings.updateLogCleanup": { "post": { - "operationId": "sshKey-remove", + "operationId": "settings-updateLogCleanup", "tags": [ - "sshKey" + "settings" ], "security": [ { @@ -44108,12 +44286,19 @@ "schema": { "type": "object", "properties": { - "sshKeyId": { - "type": "string" + "cronExpression": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ - "sshKeyId" + "cronExpression" ] } } @@ -44175,28 +44360,17 @@ } } }, - "/sshKey.one": { + "/settings.getLogCleanupStatus": { "get": { - "operationId": "sshKey-one", + "operationId": "settings-getLogCleanupStatus", "tags": [ - "sshKey" + "settings" ], "security": [ { "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "sshKeyId", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true - } - ], "responses": { "200": { "description": "Successful response", @@ -44263,11 +44437,11 @@ } } }, - "/sshKey.all": { + "/settings.getDokployCloudIps": { "get": { - "operationId": "sshKey-all", + "operationId": "settings-getDokployCloudIps", "tags": [ - "sshKey" + "settings" ], "security": [ { @@ -44340,9 +44514,9 @@ } } }, - "/sshKey.allForApps": { - "get": { - "operationId": "sshKey-allForApps", + "/sshKey.create": { + "post": { + "operationId": "sshKey-create", "tags": [ "sshKey" ], @@ -44351,6 +44525,48 @@ "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "privateKey": { + "type": "string" + }, + "publicKey": { + "type": "string" + }, + "organizationId": { + "type": "string" + } + }, + "required": [ + "name", + "privateKey", + "publicKey", + "organizationId" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -44394,16 +44610,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -44417,9 +44623,9 @@ } } }, - "/sshKey.generate": { + "/sshKey.remove": { "post": { - "operationId": "sshKey-generate", + "operationId": "sshKey-remove", "tags": [ "sshKey" ], @@ -44436,14 +44642,13 @@ "schema": { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "rsa", - "ed25519" - ] + "sshKeyId": { + "type": "string" } - } + }, + "required": [ + "sshKeyId" + ] } } } @@ -44504,9 +44709,9 @@ } } }, - "/sshKey.update": { - "post": { - "operationId": "sshKey-update", + "/sshKey.one": { + "get": { + "operationId": "sshKey-one", "tags": [ "sshKey" ], @@ -44515,49 +44720,17 @@ "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "lastUsedAt": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "sshKeyId": { - "type": "string" - } - }, - "required": [ - "sshKeyId" - ] - } - } + "parameters": [ + { + "in": "query", + "name": "sshKeyId", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true } - }, + ], "responses": { "200": { "description": "Successful response", @@ -44601,6 +44774,16 @@ } } }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, "500": { "description": "Internal server error", "content": { @@ -44614,11 +44797,11 @@ } } }, - "/stripe.getCurrentPlan": { + "/sshKey.all": { "get": { - "operationId": "stripe-getCurrentPlan", + "operationId": "sshKey-all", "tags": [ - "stripe" + "sshKey" ], "security": [ { @@ -44691,11 +44874,11 @@ } } }, - "/stripe.getProducts": { + "/sshKey.allForApps": { "get": { - "operationId": "stripe-getProducts", + "operationId": "sshKey-allForApps", "tags": [ - "stripe" + "sshKey" ], "security": [ { @@ -44768,11 +44951,11 @@ } } }, - "/stripe.createCheckoutSession": { + "/sshKey.generate": { "post": { - "operationId": "stripe-createCheckoutSession", + "operationId": "sshKey-generate", "tags": [ - "stripe" + "sshKey" ], "security": [ { @@ -44787,31 +44970,14 @@ "schema": { "type": "object", "properties": { - "tier": { + "type": { "type": "string", "enum": [ - "legacy", - "hobby", - "startup" + "rsa", + "ed25519" ] - }, - "productId": { - "type": "string" - }, - "serverQuantity": { - "type": "number", - "minimum": 1 - }, - "isAnnual": { - "type": "boolean" } - }, - "required": [ - "tier", - "productId", - "serverQuantity", - "isAnnual" - ] + } } } } @@ -44872,17 +45038,60 @@ } } }, - "/stripe.createCustomerPortalSession": { + "/sshKey.update": { "post": { - "operationId": "stripe-createCustomerPortalSession", + "operationId": "sshKey-update", "tags": [ - "stripe" + "sshKey" ], "security": [ { "x-api-key": [] } ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "minLength": 1 + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "lastUsedAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sshKeyId": { + "type": "string" + } + }, + "required": [ + "sshKeyId" + ] + } + } + } + }, "responses": { "200": { "description": "Successful response", @@ -44939,9 +45148,9 @@ } } }, - "/stripe.upgradeSubscription": { - "post": { - "operationId": "stripe-upgradeSubscription", + "/stripe.getCurrentPlan": { + "get": { + "operationId": "stripe-getCurrentPlan", "tags": [ "stripe" ], @@ -44950,38 +45159,6 @@ "x-api-key": [] } ], - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "tier": { - "type": "string", - "enum": [ - "hobby", - "startup" - ] - }, - "serverQuantity": { - "type": "number", - "minimum": 1 - }, - "isAnnual": { - "type": "boolean" - } - }, - "required": [ - "tier", - "serverQuantity", - "isAnnual" - ] - } - } - } - }, "responses": { "200": { "description": "Successful response", @@ -45025,6 +45202,16 @@ } } }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, "500": { "description": "Internal server error", "content": { @@ -45038,9 +45225,9 @@ } } }, - "/stripe.canCreateMoreServers": { + "/stripe.getProducts": { "get": { - "operationId": "stripe-canCreateMoreServers", + "operationId": "stripe-getProducts", "tags": [ "stripe" ], @@ -45115,9 +45302,9 @@ } } }, - "/stripe.updateInvoiceNotifications": { + "/stripe.createCheckoutSession": { "post": { - "operationId": "stripe-updateInvoiceNotifications", + "operationId": "stripe-createCheckoutSession", "tags": [ "stripe" ], @@ -45134,12 +45321,30 @@ "schema": { "type": "object", "properties": { - "enabled": { + "tier": { + "type": "string", + "enum": [ + "legacy", + "hobby", + "startup" + ] + }, + "productId": { + "type": "string" + }, + "serverQuantity": { + "type": "number", + "minimum": 1 + }, + "isAnnual": { "type": "boolean" } }, "required": [ - "enabled" + "tier", + "productId", + "serverQuantity", + "isAnnual" ] } } @@ -45201,9 +45406,9 @@ } } }, - "/stripe.getInvoices": { - "get": { - "operationId": "stripe-getInvoices", + "/stripe.createCustomerPortalSession": { + "post": { + "operationId": "stripe-createCustomerPortalSession", "tags": [ "stripe" ], @@ -45255,16 +45460,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -45278,26 +45473,49 @@ } } }, - "/swarm.getNodes": { - "get": { - "operationId": "swarm-getNodes", + "/stripe.upgradeSubscription": { + "post": { + "operationId": "stripe-upgradeSubscription", "tags": [ - "swarm" + "stripe" ], "security": [ { "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tier": { + "type": "string", + "enum": [ + "hobby", + "startup" + ] + }, + "serverQuantity": { + "type": "number", + "minimum": 1 + }, + "isAnnual": { + "type": "boolean" + } + }, + "required": [ + "tier", + "serverQuantity", + "isAnnual" + ] + } } } - ], + }, "responses": { "200": { "description": "Successful response", @@ -45341,16 +45559,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -45364,34 +45572,17 @@ } } }, - "/swarm.getNodeInfo": { + "/stripe.canCreateMoreServers": { "get": { - "operationId": "swarm-getNodeInfo", + "operationId": "stripe-canCreateMoreServers", "tags": [ - "swarm" + "stripe" ], "security": [ { "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "nodeId", - "schema": { - "type": "string" - }, - "required": true - }, - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -45458,26 +45649,36 @@ } } }, - "/swarm.getNodeApps": { - "get": { - "operationId": "swarm-getNodeApps", + "/stripe.updateInvoiceNotifications": { + "post": { + "operationId": "stripe-updateInvoiceNotifications", "tags": [ - "swarm" + "stripe" ], "security": [ { "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + } } } - ], + }, "responses": { "200": { "description": "Successful response", @@ -45521,16 +45722,6 @@ } } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, "500": { "description": "Internal server error", "content": { @@ -45544,26 +45735,17 @@ } } }, - "/swarm.getContainerStats": { + "/stripe.getInvoices": { "get": { - "operationId": "swarm-getContainerStats", + "operationId": "stripe-getInvoices", "tags": [ - "swarm" + "stripe" ], "security": [ { "x-api-key": [] } ], - "parameters": [ - { - "in": "query", - "name": "serverId", - "schema": { - "type": "string" - } - } - ], "responses": { "200": { "description": "Successful response", @@ -45630,17 +45812,26 @@ } } }, - "/user.all": { + "/swarm.getNodes": { "get": { - "operationId": "user-all", + "operationId": "swarm-getNodes", "tags": [ - "user" + "swarm" ], "security": [ { "x-api-key": [] } ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "Successful response", @@ -45707,11 +45898,11 @@ } } }, - "/user.one": { + "/swarm.getNodeInfo": { "get": { - "operationId": "user-one", + "operationId": "swarm-getNodeInfo", "tags": [ - "user" + "swarm" ], "security": [ { @@ -45721,11 +45912,18 @@ "parameters": [ { "in": "query", - "name": "userId", + "name": "nodeId", "schema": { "type": "string" }, "required": true + }, + { + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } } ], "responses": { @@ -45794,92 +45992,24 @@ } } }, - "/user.session": { + "/swarm.getNodeApps": { "get": { - "operationId": "user-session", + "operationId": "swarm-getNodeApps", "tags": [ - "user" + "swarm" ], "security": [ { "x-api-key": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/user.get": { - "get": { - "operationId": "user-get", - "tags": [ - "user" - ], - "security": [ + "parameters": [ { - "x-api-key": [] + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } } ], "responses": { @@ -45948,92 +46078,496 @@ } } }, - "/user.getPermissions": { + "/swarm.getContainerStats": { "get": { - "operationId": "user-getPermissions", + "operationId": "swarm-getContainerStats", "tags": [ - "user" + "swarm" ], "security": [ { "x-api-key": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": {}, - "additionalProperties": false - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "401": { - "description": "Authorization not provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.UNAUTHORIZED" - } - } - } - }, - "403": { - "description": "Insufficient access", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.FORBIDDEN" - } - } - } - }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.NOT_FOUND" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, - "/user.haveRootAccess": { - "get": { - "operationId": "user-haveRootAccess", - "tags": [ - "user" - ], - "security": [ + "parameters": [ { - "x-api-key": [] + "in": "query", + "name": "serverId", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.all": { + "get": { + "operationId": "user-all", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.one": { + "get": { + "operationId": "user-one", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "userId", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.session": { + "get": { + "operationId": "user-session", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.get": { + "get": { + "operationId": "user-get", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.getPermissions": { + "get": { + "operationId": "user-getPermissions", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/user.haveRootAccess": { + "get": { + "operationId": "user-haveRootAccess", + "tags": [ + "user" + ], + "security": [ + { + "x-api-key": [] } ], "responses": { @@ -50448,6 +50982,83 @@ } } }, + "/sso.enforceSSO": { + "get": { + "operationId": "sso-enforceSSO", + "tags": [ + "sso" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, "/sso.listProviders": { "get": { "operationId": "sso-listProviders", @@ -51739,6 +52350,913 @@ } } }, + "/forwardAuth.getAuthDomain": { + "get": { + "operationId": "forwardAuth-getAuthDomain", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "serverId", + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.setAuthDomain": { + "post": { + "operationId": "forwardAuth-setAuthDomain", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "authDomain": { + "type": "string" + }, + "https": { + "default": true, + "type": "boolean" + }, + "certificateType": { + "default": "letsencrypt", + "type": "string", + "enum": [ + "none", + "letsencrypt", + "custom" + ] + }, + "customCertResolver": { + "type": "string" + } + }, + "required": [ + "serverId", + "authDomain" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.removeAuthDomain": { + "post": { + "operationId": "forwardAuth-removeAuthDomain", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "serverId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.listProviders": { + "get": { + "operationId": "forwardAuth-listProviders", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.serverStatus": { + "get": { + "operationId": "forwardAuth-serverStatus", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.deployOnServer": { + "post": { + "operationId": "forwardAuth-deployOnServer", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "providerId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "serverId", + "providerId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.removeOnServer": { + "post": { + "operationId": "forwardAuth-removeOnServer", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "serverId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "serverId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.status": { + "get": { + "operationId": "forwardAuth-status", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "domainId", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.NOT_FOUND" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.enable": { + "post": { + "operationId": "forwardAuth-enable", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domainId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "domainId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, + "/forwardAuth.disable": { + "post": { + "operationId": "forwardAuth-disable", + "tags": [ + "forwardAuth" + ], + "security": [ + { + "x-api-key": [] + } + ], + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "domainId": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "domainId" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {}, + "additionalProperties": false + } + } + } + }, + "400": { + "description": "Invalid input data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.BAD_REQUEST" + } + } + } + }, + "401": { + "description": "Authorization not provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.UNAUTHORIZED" + } + } + } + }, + "403": { + "description": "Insufficient access", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.FORBIDDEN" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" + } + } + } + } + } + } + }, "/whitelabeling.get": { "get": { "operationId": "whitelabeling-get", @@ -52916,6 +54434,16 @@ "name": { "type": "string" }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, "cronExpression": { "type": "string" }, @@ -52991,7 +54519,7 @@ } ] }, - "userId": { + "organizationId": { "anyOf": [ { "type": "string" @@ -53109,6 +54637,16 @@ "name": { "type": "string" }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, "cronExpression": { "type": "string" }, @@ -53184,7 +54722,7 @@ } ] }, - "userId": { + "organizationId": { "anyOf": [ { "type": "string" diff --git a/src/generated/tools.ts b/src/generated/tools.ts index a141bc0..12ce81e 100644 --- a/src/generated/tools.ts +++ b/src/generated/tools.ts @@ -1,5 +1,5 @@ // AUTO-GENERATED FILE — DO NOT EDIT MANUALLY -// Generated from openapi.json on 2026-04-25 +// Generated from openapi.json on 2026-07-02 // Run `pnpm generate` to regenerate import { z } from "zod"; @@ -132,7 +132,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "application", method: "POST", path: "/application.saveGithubProvider", - schema: z.object({ "applicationId": z.string(), "repository": z.union([z.string(), z.null()]), "branch": z.union([z.string(), z.null()]), "owner": z.union([z.string(), z.null()]), "buildPath": z.union([z.string(), z.null()]), "githubId": z.union([z.string(), z.null()]), "triggerType": z.enum(["push","tag"]).default("push"), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), + schema: z.object({ "applicationId": z.string(), "repository": z.union([z.string(), z.null()]), "owner": z.union([z.string(), z.null()]), "buildPath": z.union([z.string(), z.null()]), "githubId": z.union([z.string(), z.null()]), "branch": z.string().regex(new RegExp("^[a-zA-Z0-9._\\-/]+$")).min(1), "triggerType": z.enum(["push","tag"]).default("push"), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), annotations: { title: "Application SaveGithubProvider", ...{"idempotentHint":true,"openWorldHint":true}, @@ -144,7 +144,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "application", method: "POST", path: "/application.saveGitlabProvider", - schema: z.object({ "applicationId": z.string(), "gitlabBranch": z.union([z.string(), z.null()]), "gitlabBuildPath": z.union([z.string(), z.null()]), "gitlabOwner": z.union([z.string(), z.null()]), "gitlabRepository": z.union([z.string(), z.null()]), "gitlabId": z.union([z.string(), z.null()]), "gitlabProjectId": z.union([z.number(), z.null()]), "gitlabPathNamespace": z.union([z.string(), z.null()]), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), + schema: z.object({ "applicationId": z.string(), "gitlabBuildPath": z.union([z.string(), z.null()]), "gitlabOwner": z.union([z.string(), z.null()]), "gitlabRepository": z.union([z.string(), z.null()]), "gitlabId": z.union([z.string(), z.null()]), "gitlabProjectId": z.union([z.number(), z.null()]), "gitlabPathNamespace": z.union([z.string(), z.null()]), "gitlabBranch": z.string().regex(new RegExp("^[a-zA-Z0-9._\\-/]+$")).min(1), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), annotations: { title: "Application SaveGitlabProvider", ...{"idempotentHint":true,"openWorldHint":true}, @@ -156,7 +156,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "application", method: "POST", path: "/application.saveBitbucketProvider", - schema: z.object({ "bitbucketBranch": z.union([z.string(), z.null()]), "bitbucketBuildPath": z.union([z.string(), z.null()]), "bitbucketOwner": z.union([z.string(), z.null()]), "bitbucketRepository": z.union([z.string(), z.null()]), "bitbucketRepositorySlug": z.union([z.string(), z.null()]), "bitbucketId": z.union([z.string(), z.null()]), "applicationId": z.string(), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), + schema: z.object({ "bitbucketBuildPath": z.union([z.string(), z.null()]), "bitbucketOwner": z.union([z.string(), z.null()]), "bitbucketRepository": z.union([z.string(), z.null()]), "bitbucketRepositorySlug": z.union([z.string(), z.null()]), "bitbucketId": z.union([z.string(), z.null()]), "applicationId": z.string(), "bitbucketBranch": z.string().regex(new RegExp("^[a-zA-Z0-9._\\-/]+$")).min(1), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), annotations: { title: "Application SaveBitbucketProvider", ...{"idempotentHint":true,"openWorldHint":true}, @@ -168,7 +168,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "application", method: "POST", path: "/application.saveGiteaProvider", - schema: z.object({ "applicationId": z.string(), "giteaBranch": z.union([z.string(), z.null()]), "giteaBuildPath": z.union([z.string(), z.null()]), "giteaOwner": z.union([z.string(), z.null()]), "giteaRepository": z.union([z.string(), z.null()]), "giteaId": z.union([z.string(), z.null()]), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), + schema: z.object({ "applicationId": z.string(), "giteaBuildPath": z.union([z.string(), z.null()]), "giteaOwner": z.union([z.string(), z.null()]), "giteaRepository": z.union([z.string(), z.null()]), "giteaId": z.union([z.string(), z.null()]), "giteaBranch": z.string().regex(new RegExp("^[a-zA-Z0-9._\\-/]+$")).min(1), "enableSubmodules": z.boolean().optional(), "watchPaths": z.union([z.array(z.string()), z.null()]).optional() }), annotations: { title: "Application SaveGiteaProvider", ...{"idempotentHint":true,"openWorldHint":true}, @@ -192,7 +192,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "application", method: "POST", path: "/application.saveGitProvider", - schema: z.object({ "customGitBranch": z.union([z.string(), z.null()]), "applicationId": z.string(), "customGitBuildPath": z.union([z.string(), z.null()]), "customGitUrl": z.union([z.string(), z.null()]), "watchPaths": z.union([z.array(z.string()), z.null()]), "enableSubmodules": z.boolean().optional(), "customGitSSHKeyId": z.union([z.string(), z.null()]).optional() }), + schema: z.object({ "applicationId": z.string(), "customGitBuildPath": z.union([z.string(), z.null()]), "customGitUrl": z.union([z.string(), z.null()]), "watchPaths": z.union([z.array(z.string()), z.null()]), "enableSubmodules": z.boolean().optional(), "customGitBranch": z.string().regex(new RegExp("^[a-zA-Z0-9._\\-/]+$")).min(1), "customGitSSHKeyId": z.union([z.string(), z.null()]).optional() }), annotations: { title: "Application SaveGitProvider", ...{"idempotentHint":true,"openWorldHint":true}, @@ -1038,6 +1038,18 @@ export const generatedTools: ToolDefinition[] = [ ...{"idempotentHint":true,"openWorldHint":true}, }, }, + { + name: "compose-previewTemplate", + description: "POST /compose.previewTemplate", + tag: "compose", + method: "POST", + path: "/compose.previewTemplate", + schema: z.object({ "base64": z.string(), "appName": z.string(), "serverId": z.string().optional() }), + annotations: { + title: "Compose PreviewTemplate", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "compose-import", description: "POST /compose.import", @@ -1182,6 +1194,18 @@ export const generatedTools: ToolDefinition[] = [ ...{"destructiveHint":true,"openWorldHint":true}, }, }, + { + name: "deployment-readLogs", + description: "GET /deployment.readLogs", + tag: "deployment", + method: "GET", + path: "/deployment.readLogs", + schema: z.object({ "deploymentId": z.string().min(1), "tail": z.number().int().gte(1).lte(10000).default(100) }), + annotations: { + title: "Deployment ReadLogs", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "destination-create", description: "POST /destination.create", @@ -1404,7 +1428,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "domain", method: "POST", path: "/domain.create", - schema: z.object({ "host": z.string().min(1), "path": z.union([z.string().min(1), z.null()]).optional(), "port": z.union([z.number().gte(1).lte(65535), z.null()]).optional(), "customEntrypoint": z.union([z.string(), z.null()]).optional(), "https": z.boolean().optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "certificateType": z.enum(["letsencrypt","none","custom"]).optional(), "customCertResolver": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "domainType": z.union([z.enum(["compose","application","preview"]), z.null()]).optional(), "previewDeploymentId": z.union([z.string(), z.null()]).optional(), "internalPath": z.union([z.string(), z.null()]).optional(), "stripPath": z.boolean().optional(), "middlewares": z.union([z.array(z.string()), z.null()]).optional() }), + schema: z.object({ "host": z.string().min(1), "path": z.union([z.string().min(1), z.null()]).optional(), "port": z.union([z.number().gte(1).lte(65535), z.null()]).optional(), "customEntrypoint": z.union([z.string(), z.null()]).optional(), "https": z.boolean().optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "certificateType": z.enum(["letsencrypt","none","custom"]).optional(), "customCertResolver": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "domainType": z.union([z.enum(["compose","application","preview"]), z.null()]).optional(), "previewDeploymentId": z.union([z.string(), z.null()]).optional(), "internalPath": z.union([z.string(), z.null()]).optional(), "stripPath": z.boolean().optional(), "middlewares": z.union([z.array(z.string()), z.null()]).optional(), "forwardAuthEnabled": z.boolean().optional() }), annotations: { title: "Domain Create", ...{"openWorldHint":true}, @@ -1464,7 +1488,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "domain", method: "POST", path: "/domain.update", - schema: z.object({ "host": z.string().min(1), "path": z.union([z.string().min(1), z.null()]).optional(), "port": z.union([z.number().gte(1).lte(65535), z.null()]).optional(), "customEntrypoint": z.union([z.string(), z.null()]).optional(), "https": z.boolean().optional(), "certificateType": z.enum(["letsencrypt","none","custom"]).optional(), "customCertResolver": z.union([z.string(), z.null()]).optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "domainType": z.union([z.enum(["compose","application","preview"]), z.null()]).optional(), "internalPath": z.union([z.string(), z.null()]).optional(), "stripPath": z.boolean().optional(), "middlewares": z.union([z.array(z.string()), z.null()]).optional(), "domainId": z.string() }), + schema: z.object({ "host": z.string().min(1), "path": z.union([z.string().min(1), z.null()]).optional(), "port": z.union([z.number().gte(1).lte(65535), z.null()]).optional(), "customEntrypoint": z.union([z.string(), z.null()]).optional(), "https": z.boolean().optional(), "certificateType": z.enum(["letsencrypt","none","custom"]).optional(), "customCertResolver": z.union([z.string(), z.null()]).optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "domainType": z.union([z.enum(["compose","application","preview"]), z.null()]).optional(), "internalPath": z.union([z.string(), z.null()]).optional(), "stripPath": z.boolean().optional(), "middlewares": z.union([z.array(z.string()), z.null()]).optional(), "forwardAuthEnabled": z.boolean().optional(), "domainId": z.string() }), annotations: { title: "Domain Update", ...{"idempotentHint":true,"openWorldHint":true}, @@ -3888,7 +3912,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "server", method: "POST", path: "/server.create", - schema: z.object({ "name": z.string().min(1), "description": z.union([z.string(), z.null()]), "ipAddress": z.string(), "port": z.number(), "username": z.string(), "sshKeyId": z.union([z.string(), z.null()]), "serverType": z.enum(["deploy","build"]) }), + schema: z.object({ "name": z.string().min(1), "description": z.union([z.string(), z.null()]), "ipAddress": z.string(), "port": z.number(), "username": z.string(), "sshKeyId": z.union([z.string(), z.null()]), "serverType": z.enum(["deploy","build"]), "enableDockerCleanup": z.boolean().default(true) }), annotations: { title: "Server Create", ...{"openWorldHint":true}, @@ -4044,12 +4068,24 @@ export const generatedTools: ToolDefinition[] = [ tag: "server", method: "POST", path: "/server.update", - schema: z.object({ "name": z.string().min(1), "description": z.union([z.string(), z.null()]), "serverId": z.string().min(1), "ipAddress": z.string(), "port": z.number(), "username": z.string(), "sshKeyId": z.union([z.string(), z.null()]), "serverType": z.enum(["deploy","build"]), "command": z.string().optional() }), + schema: z.object({ "name": z.string().min(1), "description": z.union([z.string(), z.null()]), "serverId": z.string().min(1), "ipAddress": z.string(), "port": z.number(), "username": z.string(), "sshKeyId": z.union([z.string(), z.null()]), "serverType": z.enum(["deploy","build"]), "enableDockerCleanup": z.boolean().default(true), "command": z.string().optional() }), annotations: { title: "Server Update", ...{"idempotentHint":true,"openWorldHint":true}, }, }, + { + name: "server-updateBuildsConcurrency", + description: "POST /server.updateBuildsConcurrency", + tag: "server", + method: "POST", + path: "/server.updateBuildsConcurrency", + schema: z.object({ "serverId": z.string().min(1), "buildsConcurrency": z.number().int().gte(1).lte(100) }), + annotations: { + title: "Server UpdateBuildsConcurrency", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "server-publicIp", description: "GET /server.publicIp", @@ -4314,6 +4350,42 @@ export const generatedTools: ToolDefinition[] = [ ...{"idempotentHint":true,"openWorldHint":true}, }, }, + { + name: "settings-updateRemoteServersOnly", + description: "POST /settings.updateRemoteServersOnly", + tag: "settings", + method: "POST", + path: "/settings.updateRemoteServersOnly", + schema: z.object({ "remoteServersOnly": z.boolean() }), + annotations: { + title: "Settings UpdateRemoteServersOnly", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "settings-updateBuildsConcurrency", + description: "POST /settings.updateBuildsConcurrency", + tag: "settings", + method: "POST", + path: "/settings.updateBuildsConcurrency", + schema: z.object({ "buildsConcurrency": z.number().int().gte(1).lte(100) }), + annotations: { + title: "Settings UpdateBuildsConcurrency", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "settings-updateEnforceSSO", + description: "POST /settings.updateEnforceSSO", + tag: "settings", + method: "POST", + path: "/settings.updateEnforceSSO", + schema: z.object({ "enforceSSO": z.boolean() }), + annotations: { + title: "Settings UpdateEnforceSSO", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "settings-readTraefikConfig", description: "GET /settings.readTraefikConfig", @@ -5562,6 +5634,18 @@ export const generatedTools: ToolDefinition[] = [ ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, }, }, + { + name: "sso-enforceSSO", + description: "GET /sso.enforceSSO", + tag: "sso", + method: "GET", + path: "/sso.enforceSSO", + schema: z.object({}), + annotations: { + title: "Sso EnforceSSO", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "sso-listProviders", description: "GET /sso.listProviders", @@ -5670,6 +5754,126 @@ export const generatedTools: ToolDefinition[] = [ ...{"idempotentHint":true,"openWorldHint":true}, }, }, + { + name: "forwardAuth-getAuthDomain", + description: "GET /forwardAuth.getAuthDomain", + tag: "forwardAuth", + method: "GET", + path: "/forwardAuth.getAuthDomain", + schema: z.object({ "serverId": z.union([z.string(), z.null()]) }), + annotations: { + title: "ForwardAuth GetAuthDomain", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-setAuthDomain", + description: "POST /forwardAuth.setAuthDomain", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.setAuthDomain", + schema: z.object({ "serverId": z.union([z.string(), z.null()]), "authDomain": z.string(), "https": z.boolean().default(true), "certificateType": z.enum(["none","letsencrypt","custom"]).default("letsencrypt"), "customCertResolver": z.string().optional() }), + annotations: { + title: "ForwardAuth SetAuthDomain", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-removeAuthDomain", + description: "POST /forwardAuth.removeAuthDomain", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.removeAuthDomain", + schema: z.object({ "serverId": z.union([z.string(), z.null()]) }), + annotations: { + title: "ForwardAuth RemoveAuthDomain", + ...{"destructiveHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-listProviders", + description: "GET /forwardAuth.listProviders", + tag: "forwardAuth", + method: "GET", + path: "/forwardAuth.listProviders", + schema: z.object({}), + annotations: { + title: "ForwardAuth ListProviders", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-serverStatus", + description: "GET /forwardAuth.serverStatus", + tag: "forwardAuth", + method: "GET", + path: "/forwardAuth.serverStatus", + schema: z.object({}), + annotations: { + title: "ForwardAuth ServerStatus", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-deployOnServer", + description: "POST /forwardAuth.deployOnServer", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.deployOnServer", + schema: z.object({ "serverId": z.union([z.string(), z.null()]), "providerId": z.string().min(1) }), + annotations: { + title: "ForwardAuth DeployOnServer", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-removeOnServer", + description: "POST /forwardAuth.removeOnServer", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.removeOnServer", + schema: z.object({ "serverId": z.union([z.string(), z.null()]) }), + annotations: { + title: "ForwardAuth RemoveOnServer", + ...{"destructiveHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-status", + description: "GET /forwardAuth.status", + tag: "forwardAuth", + method: "GET", + path: "/forwardAuth.status", + schema: z.object({ "domainId": z.string().min(1) }), + annotations: { + title: "ForwardAuth Status", + ...{"readOnlyHint":true,"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-enable", + description: "POST /forwardAuth.enable", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.enable", + schema: z.object({ "domainId": z.string().min(1) }), + annotations: { + title: "ForwardAuth Enable", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, + { + name: "forwardAuth-disable", + description: "POST /forwardAuth.disable", + tag: "forwardAuth", + method: "POST", + path: "/forwardAuth.disable", + schema: z.object({ "domainId": z.string().min(1) }), + annotations: { + title: "ForwardAuth Disable", + ...{"idempotentHint":true,"openWorldHint":true}, + }, + }, { name: "whitelabeling-get", description: "GET /whitelabeling.get", @@ -5808,7 +6012,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "schedule", method: "POST", path: "/schedule.create", - schema: z.object({ "scheduleId": z.string().optional(), "name": z.string(), "cronExpression": z.string(), "appName": z.string().optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "shellType": z.enum(["bash","sh"]).optional(), "scheduleType": z.enum(["application","compose","server","dokploy-server"]).optional(), "command": z.string(), "script": z.union([z.string(), z.null()]).optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serverId": z.union([z.string(), z.null()]).optional(), "userId": z.union([z.string(), z.null()]).optional(), "enabled": z.boolean().optional(), "timezone": z.union([z.string(), z.null()]).optional(), "createdAt": z.string().optional() }), + schema: z.object({ "scheduleId": z.string().optional(), "name": z.string(), "description": z.union([z.string(), z.null()]).optional(), "cronExpression": z.string(), "appName": z.string().optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "shellType": z.enum(["bash","sh"]).optional(), "scheduleType": z.enum(["application","compose","server","dokploy-server"]).optional(), "command": z.string(), "script": z.union([z.string(), z.null()]).optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serverId": z.union([z.string(), z.null()]).optional(), "organizationId": z.union([z.string(), z.null()]).optional(), "enabled": z.boolean().optional(), "timezone": z.union([z.string(), z.null()]).optional(), "createdAt": z.string().optional() }), annotations: { title: "Schedule Create", ...{"openWorldHint":true}, @@ -5820,7 +6024,7 @@ export const generatedTools: ToolDefinition[] = [ tag: "schedule", method: "POST", path: "/schedule.update", - schema: z.object({ "scheduleId": z.string().min(1), "name": z.string(), "cronExpression": z.string(), "appName": z.string().optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "shellType": z.enum(["bash","sh"]).optional(), "scheduleType": z.enum(["application","compose","server","dokploy-server"]).optional(), "command": z.string(), "script": z.union([z.string(), z.null()]).optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serverId": z.union([z.string(), z.null()]).optional(), "userId": z.union([z.string(), z.null()]).optional(), "enabled": z.boolean().optional(), "timezone": z.union([z.string(), z.null()]).optional(), "createdAt": z.string().optional() }), + schema: z.object({ "scheduleId": z.string().min(1), "name": z.string(), "description": z.union([z.string(), z.null()]).optional(), "cronExpression": z.string(), "appName": z.string().optional(), "serviceName": z.union([z.string(), z.null()]).optional(), "shellType": z.enum(["bash","sh"]).optional(), "scheduleType": z.enum(["application","compose","server","dokploy-server"]).optional(), "command": z.string(), "script": z.union([z.string(), z.null()]).optional(), "applicationId": z.union([z.string(), z.null()]).optional(), "composeId": z.union([z.string(), z.null()]).optional(), "serverId": z.union([z.string(), z.null()]).optional(), "organizationId": z.union([z.string(), z.null()]).optional(), "enabled": z.boolean().optional(), "timezone": z.union([z.string(), z.null()]).optional(), "createdAt": z.string().optional() }), annotations: { title: "Schedule Update", ...{"idempotentHint":true,"openWorldHint":true}, diff --git a/src/server.test.ts b/src/server.test.ts index 663dbad..4247d3c 100644 --- a/src/server.test.ts +++ b/src/server.test.ts @@ -1,6 +1,6 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js"; import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js"; -import { describe, expect, it, vi } from "vitest"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; // Mock apiClient before server.ts is imported — it calls getClientConfig() at // module level which requires DOKPLOY_URL/DOKPLOY_API_KEY env vars. @@ -10,15 +10,44 @@ vi.mock("./utils/apiClient.js", () => ({ clearAuthToken: vi.fn(), })); +const { default: apiClient } = await import("./utils/apiClient.js"); const { createServer } = await import("./server.js"); describe("MCP server tools/list", () => { - async function getToolList() { + const originalDokployUrl = process.env.DOKPLOY_URL; + const originalDokployApiKey = process.env.DOKPLOY_API_KEY; + + beforeEach(() => { + vi.clearAllMocks(); + process.env.DOKPLOY_URL = "https://dokploy.example"; + process.env.DOKPLOY_API_KEY = "test-api-key"; + }); + + afterEach(() => { + if (originalDokployUrl === undefined) { + delete process.env.DOKPLOY_URL; + } else { + process.env.DOKPLOY_URL = originalDokployUrl; + } + + if (originalDokployApiKey === undefined) { + delete process.env.DOKPLOY_API_KEY; + } else { + process.env.DOKPLOY_API_KEY = originalDokployApiKey; + } + }); + + async function createConnectedClient() { const server = createServer(); const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair(); await server.connect(serverTransport); const client = new Client({ name: "test-client", version: "1.0.0" }); await client.connect(clientTransport); + return client; + } + + async function getToolList() { + const client = await createConnectedClient(); const { tools } = await client.listTools(); await client.close(); return tools; @@ -29,14 +58,70 @@ describe("MCP server tools/list", () => { expect(tools.length).toBeGreaterThan(0); }); + it("exposes deployment-readLogs for schedule deployment log inspection", async () => { + const tools = await getToolList(); + const tool = tools.find(({ name }) => name === "deployment-readLogs"); + + expect(tool).toBeDefined(); + expect(tool?.description).toBe("GET /deployment.readLogs"); + + const schema = tool?.inputSchema as Record; + const properties = schema.properties as Record>; + const required = schema.required as string[]; + + expect(properties.deploymentId).toMatchObject({ + type: "string", + minLength: 1, + }); + expect(properties.tail).toMatchObject({ + type: "integer", + minimum: 1, + maximum: 10000, + default: 100, + }); + expect(required).toContain("deploymentId"); + }); + + it("routes deployment-readLogs calls to the deployment log API endpoint", async () => { + vi.mocked(apiClient.get).mockResolvedValue({ + data: "schedule stdout\nschedule stderr", + }); + + const client = await createConnectedClient(); + const result = await client.callTool({ + name: "deployment-readLogs", + arguments: { + deploymentId: "dep_test", + tail: 25, + }, + }); + await client.close(); + + expect(apiClient.get).toHaveBeenCalledWith("/deployment.readLogs", { + params: { + deploymentId: "dep_test", + tail: 25, + }, + }); + + const content = result.content[0]; + expect(content.type).toBe("text"); + const parsed = JSON.parse(content.type === "text" ? content.text : ""); + + expect(parsed).toEqual({ + success: true, + message: "deployment-readLogs completed successfully", + data: "schedule stdout\nschedule stderr", + }); + }); + it("every tool inputSchema has $schema set to draft 2020-12", async () => { const tools = await getToolList(); for (const tool of tools) { const schema = tool.inputSchema as Record; - expect( - schema.$schema, - `Tool "${tool.name}" is missing $schema or has wrong draft`, - ).toBe("https://json-schema.org/draft/2020-12/schema"); + expect(schema.$schema, `Tool "${tool.name}" is missing $schema or has wrong draft`).toBe( + "https://json-schema.org/draft/2020-12/schema", + ); } }); @@ -60,7 +145,10 @@ describe("MCP server tools/list", () => { for (const tool of tools) { const found = findNestedSchemaKeys(tool.inputSchema); - expect(found, `Tool "${tool.name}" has nested $schema keys at: ${found.join(", ")}`).toHaveLength(0); + expect( + found, + `Tool "${tool.name}" has nested $schema keys at: ${found.join(", ")}`, + ).toHaveLength(0); } });