{
  "openapi": "3.1.0",
  "info": {
    "title": "Catalyst API",
    "description": "Authoritative endpoint contract generated statically from catalyst-backend/src/routes/. Request/response shapes are validated by zod schemas in the handlers; this document captures routes, auth, parameters, and referenced error codes. Generated by scripts/export-openapi.ts — do not edit by hand.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/api",
      "description": "Same origin as the panel"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "API Keys"
    },
    {
      "name": "Admin"
    },
    {
      "name": "Admin Events"
    },
    {
      "name": "Alerts"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "Internal"
    },
    {
      "name": "Locations"
    },
    {
      "name": "Migration"
    },
    {
      "name": "Nests"
    },
    {
      "name": "Nodes"
    },
    {
      "name": "Plugins"
    },
    {
      "name": "Providers"
    },
    {
      "name": "Roles"
    },
    {
      "name": "Servers"
    },
    {
      "name": "Settings"
    },
    {
      "name": "Setup"
    },
    {
      "name": "Templates"
    }
  ],
  "paths": {
    "/api/admin/api-keys": {
      "post": {
        "summary": "POST / ──",
        "description": "POST / ──\nCreate a new API key with optional permission scoping.",
        "tags": [
          "API Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/api-keys.ts:73",
          "permissionGuards": [
            "ApiKeyManage"
          ],
          "errorCodes": [
            "PERMISSION_DENIED",
            "INTERNAL_ERROR"
          ]
        }
      },
      "get": {
        "summary": "GET / ──",
        "description": "GET / ──\nList API keys. Admins (admin.read) see all keys; non-admin holders of\napikey.manage are scoped to their own keys to prevent enumeration of\nother users' keys.",
        "tags": [
          "API Keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR, API_KEY_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/api-keys.ts:163",
          "permissionGuards": [
            "ApiKeyRead"
          ],
          "errorCodes": [
            "INTERNAL_ERROR",
            "API_KEY_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/api-keys/my-permissions": {
      "get": {
        "summary": "GET /my-permissions ──",
        "description": "GET /my-permissions ──\nReturns the current user's effective permissions (resolved from roles).\nUsed by the frontend to cap what permissions can be granted to an API key.",
        "tags": [
          "API Keys"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/api-keys.ts:64",
          "permissionGuards": [
            "ApiKeyRead"
          ]
        }
      }
    },
    "/api/admin/api-keys/permissions-catalog": {
      "get": {
        "summary": "GET /permissions-catalog ──",
        "description": "GET /permissions-catalog ──\nReturns the full list of permission categories + individual permissions.\nUsed by the frontend to render the permission selector.",
        "tags": [
          "API Keys"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/api-keys.ts:55",
          "permissionGuards": [
            "ApiKeyRead"
          ]
        }
      }
    },
    "/api/admin/audit-logs": {
      "get": {
        "summary": "Get audit logs (requires admin.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2064",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/audit-logs/export": {
      "get": {
        "summary": "Export audit logs (admin only)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2157",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/auth-lockouts": {
      "get": {
        "summary": "Auth Lockouts ────────────────────────────────────────────────────────────",
        "description": "Auth Lockouts ────────────────────────────────────────────────────────────\nList auth lockouts",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3908",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/auth-lockouts/{lockoutId}": {
      "delete": {
        "summary": "Delete a specific auth lockout",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "lockoutId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_LOCKOUT_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3960",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_LOCKOUT_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/database-hosts": {
      "get": {
        "summary": "Database hosts: list",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3177",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "post": {
        "summary": "Database hosts: create",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR, ADMIN_DATABASE_HOST_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3198",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "ADMIN_DATABASE_HOST_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/admin/database-hosts/{hostId}": {
      "put": {
        "summary": "Database hosts: update",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "hostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_DATABASE_HOST_NOT_FOUND, VALIDATION_ERROR, ADMIN_DATABASE_HOST_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3289",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_DATABASE_HOST_NOT_FOUND",
            "VALIDATION_ERROR",
            "ADMIN_DATABASE_HOST_NAME_TAKEN"
          ]
        }
      },
      "delete": {
        "summary": "Database hosts: delete",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "hostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_DATABASE_HOST_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3393",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_DATABASE_HOST_IN_USE"
          ]
        }
      }
    },
    "/api/admin/database-hosts/{hostId}/ping": {
      "get": {
        "summary": "Database host: test connection (ping)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "hostId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_DATABASE_HOST_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3439",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_DATABASE_HOST_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/db-status": {
      "get": {
        "summary": "Catalyst internal database status",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3546",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/events": {
      "get": {
        "summary": "GET /api/admin/events ────────────────────────────────────────────────────",
        "description": "GET /api/admin/events ────────────────────────────────────────────────────\n\nLong-lived SSE stream for admin-level entity events.\nRequires admin authentication (any admin permission).\nPushes to globalSseSubscribers with event types matching ADMIN_EVENT_TYPES.",
        "tags": [
          "Admin Events"
        ],
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: AUTH_EXPIRED, PERMISSION_DENIED."
          }
        },
        "x-catalyst": {
          "source": "src/routes/admin-events.ts:87",
          "errorCodes": [
            "AUTH_EXPIRED",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/health": {
      "get": {
        "summary": "System health check (admin only)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2710",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/ip-pools": {
      "get": {
        "summary": "IPAM: list pools",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2813",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "post": {
        "summary": "Node interface listing (admin)",
        "description": "Node interface listing (admin)\nIPAM: create pool",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2885",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/ip-pools/{poolId}": {
      "put": {
        "summary": "IPAM: update pool",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "poolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_IP_POOL_NOT_FOUND, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2996",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_IP_POOL_NOT_FOUND",
            "VALIDATION_ERROR"
          ]
        }
      },
      "delete": {
        "summary": "IPAM: delete pool",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "poolId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_IP_POOL_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3103",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_IP_POOL_IN_USE"
          ]
        }
      }
    },
    "/api/admin/localization-settings": {
      "get": {
        "summary": "Instance language (admin only). The panel reads the public twin of this",
        "description": "Instance language (admin only). The panel reads the public twin of this\n(`GET /api/settings/locale`) before anyone signs in.",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2665",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "PUT /api/admin/localization-settings",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2677",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration": {
      "get": {
        "summary": "GET /api/admin/migration",
        "tags": [
          "Migration"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:356",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}": {
      "get": {
        "summary": "GET /api/admin/migration/:jobId",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: MIGRATION_NOT_FOUND, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:372",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "MIGRATION_NOT_FOUND",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}/cancel": {
      "post": {
        "summary": "POST /api/admin/migration/:jobId/cancel",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:427",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}/pause": {
      "post": {
        "summary": "POST /api/admin/migration/:jobId/pause",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:393",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}/resume": {
      "post": {
        "summary": "POST /api/admin/migration/:jobId/resume",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:410",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}/retry/{stepId}": {
      "post": {
        "summary": "POST /api/admin/migration/:jobId/retry/:stepId",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stepId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: MIGRATION_STEP_NOT_FOUND, MIGRATION_STEP_NOT_RETRYABLE, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:484",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "MIGRATION_STEP_NOT_FOUND",
            "MIGRATION_STEP_NOT_RETRYABLE",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/{jobId}/steps": {
      "get": {
        "summary": "GET /api/admin/migration/:jobId/steps",
        "tags": [
          "Migration"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:445",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/catalyst-nodes": {
      "get": {
        "summary": "GET /api/admin/migration/catalyst-nodes",
        "tags": [
          "Migration"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:52",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/start": {
      "post": {
        "summary": "POST /api/admin/migration/start",
        "tags": [
          "Migration"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MIGRATION_TARGET_NODES_OFFLINE, MIGRATION_TARGET_NODES_NOT_FOUND, MIGRATION_IN_PROGRESS, CREDENTIAL_ENCRYPTION_KEY_MISSING, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:142",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "MIGRATION_TARGET_NODES_OFFLINE",
            "MIGRATION_TARGET_NODES_NOT_FOUND",
            "MIGRATION_IN_PROGRESS",
            "CREDENTIAL_ENCRYPTION_KEY_MISSING",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/migration/test": {
      "post": {
        "summary": "POST /api/admin/migration/test",
        "tags": [
          "Migration"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/migration.ts:101",
          "permissionGuards": [
            "Admin"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/admin/mod-manager": {
      "get": {
        "summary": "GET /api/admin/mod-manager",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3719",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "PUT /api/admin/mod-manager",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3734",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/nodes": {
      "get": {
        "summary": "Get all nodes with details (requires node.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1329",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/oidc-config": {
      "get": {
        "summary": "OIDC Provider Configuration ─────────────────────────────────────",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:4001",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "patch": {
        "summary": "PATCH /api/admin/oidc-config",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:4038",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/roles": {
      "get": {
        "summary": "List roles (requires role.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:846",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/security-settings": {
      "get": {
        "summary": "Security settings (admin only)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2512",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "PUT /api/admin/security-settings",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2527",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/servers": {
      "get": {
        "summary": "Get all servers across nodes (requires server.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1378",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/servers/actions": {
      "post": {
        "summary": "Bulk server actions (requires appropriate server permissions)",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PERMISSION_DENIED, NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1489",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PERMISSION_DENIED",
            "NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/settings/file-tunnel-upload-limit": {
      "get": {
        "summary": "File tunnel upload size limit (available to all authenticated users)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:4129"
        }
      }
    },
    "/api/admin/smtp": {
      "get": {
        "summary": "GET /api/admin/smtp",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3606",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "PUT /api/admin/smtp",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3626",
          "permissionGuards": [
            "Tls"
          ],
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/stats": {
      "get": {
        "summary": "Get system-wide stats (requires any admin permission)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:119",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/system-errors": {
      "get": {
        "summary": "Get system errors (requires admin.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2248",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/system-errors/{id}/resolve": {
      "post": {
        "summary": "Resolve a system error (requires admin.write)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_SYSTEM_ERROR_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2434",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_SYSTEM_ERROR_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/system-errors/export": {
      "get": {
        "summary": "Export system errors (requires admin.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2325",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/system-errors/resolve-all": {
      "post": {
        "summary": "Resolve all matching system errors (requires admin.write)",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:2461",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/theme-settings": {
      "get": {
        "summary": "Theme settings: get",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3776",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "patch": {
        "summary": "Theme settings: update",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:3800",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/admin/update/state": {
      "get": {
        "summary": "Live update progress (admin only) — polled by the frontend while an",
        "description": "Live update progress (admin only) — polled by the frontend while an\nupdate is running so users can see what the panel is doing.",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/update.ts:78",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/update/status": {
      "get": {
        "summary": "Get update status (admin only)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/update.ts:27",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/admin/update/trigger": {
      "post": {
        "summary": "Trigger update (admin only)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, UPDATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/update.ts:53",
          "errorCodes": [
            "PERMISSION_DENIED",
            "UPDATE_FAILED"
          ]
        }
      }
    },
    "/api/admin/users": {
      "get": {
        "summary": "Get all users (requires user.read)",
        "tags": [
          "Admin"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:152",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      },
      "post": {
        "summary": "Create user (requires user.create)",
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR, ADMIN_USER_EXISTS, ADMIN_USER_CREATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:266",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "ADMIN_USER_EXISTS",
            "ADMIN_USER_CREATE_FAILED"
          ]
        }
      }
    },
    "/api/admin/users/{userId}": {
      "put": {
        "summary": "Update user (requires user.update and user.set_roles for role changes)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_SELF_MODIFICATION, ADMIN_USER_NOT_FOUND, ADMIN_LAST_ADMIN, VALIDATION_ERROR, ADMIN_USER_EXISTS, ADMIN_PASSWORD_UPDATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:509",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_SELF_MODIFICATION",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_LAST_ADMIN",
            "VALIDATION_ERROR",
            "ADMIN_USER_EXISTS",
            "ADMIN_PASSWORD_UPDATE_FAILED"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/accounts/{accountId}": {
      "delete": {
        "summary": "Unlink an SSO account from a user (requires user.update)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND, ADMIN_ACCOUNT_NOT_FOUND, ADMIN_LAST_AUTH_METHOD."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1244",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_ACCOUNT_NOT_FOUND",
            "ADMIN_LAST_AUTH_METHOD"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/ban": {
      "post": {
        "summary": "Ban a user (requires user.ban permission)",
        "description": "Ban a user (requires user.ban permission)\nUses Better Auth's admin plugin banUser() for DB updates + session revocation,\nthen Catalyst-specific post-processing (SFTP revocation, WebSocket disconnect,\naudit log, admin broadcast) runs via the after hook in auth.ts.",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_SELF_MODIFICATION, ADMIN_USER_NOT_FOUND, ADMIN_USER_BANNED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1034",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_SELF_MODIFICATION",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_USER_BANNED"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/delete": {
      "post": {
        "summary": "Delete user (requires user.delete)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_SELF_MODIFICATION, ADMIN_USER_NOT_FOUND, ADMIN_LAST_ADMIN, ADMIN_TRANSFER_TARGET_INVALID, ADMIN_USER_OWNS_SERVERS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:871",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_SELF_MODIFICATION",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_LAST_ADMIN",
            "ADMIN_TRANSFER_TARGET_INVALID",
            "ADMIN_USER_OWNS_SERVERS"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/enforce-2fa": {
      "put": {
        "summary": "Enforce 2FA for a user (requires user.update)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND, ADMIN_TWO_FACTOR_NOT_SET_UP."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1209",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_TWO_FACTOR_NOT_SET_UP"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/passkeys": {
      "delete": {
        "summary": "User security management endpoints ──",
        "description": "User security management endpoints ──\nWipe all passkeys for a user (requires user.update)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1152",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/servers": {
      "get": {
        "summary": "Get user server access (requires user.read)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:820",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/two-factor": {
      "delete": {
        "summary": "Wipe 2FA for a user (requires user.update)",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1180",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/unban": {
      "post": {
        "summary": "Unban a user (requires user.unban permission)",
        "description": "Unban a user (requires user.unban permission)\nUses Better Auth's admin plugin unbanUser() for DB updates.\nCatalyst-specific post-processing (audit log, admin broadcast) runs via\nthe after hook in auth.ts.",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND, ADMIN_USER_NOT_BANNED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1103",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_USER_NOT_BANNED"
          ]
        }
      }
    },
    "/api/admin/users/{userId}/verify-email": {
      "put": {
        "summary": "Manually verify a user's email address (requires user.update)",
        "description": "Manually verify a user's email address (requires user.update)\nMarks the user's email as verified without sending an email.",
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ADMIN_USER_NOT_FOUND, ADMIN_EMAIL_ALREADY_VERIFIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/admin.ts:1282",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_EMAIL_ALREADY_VERIFIED"
          ]
        }
      }
    },
    "/api/alert-rules": {
      "post": {
        "summary": "Create an alert rule",
        "tags": [
          "Alerts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:77",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "get": {
        "summary": "List alert rules",
        "tags": [
          "Alerts"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:195"
        }
      }
    },
    "/api/alert-rules/{ruleId}": {
      "get": {
        "summary": "Get a specific alert rule",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_RULE_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:228",
          "errorCodes": [
            "ALERT_RULE_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "Update an alert rule",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_RULE_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:252",
          "errorCodes": [
            "ALERT_RULE_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "delete": {
        "summary": "DELETE /api/alert-rules/:ruleId",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "ruleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_RULE_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:317",
          "errorCodes": [
            "ALERT_RULE_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/alerts": {
      "get": {
        "summary": "List alerts",
        "tags": [
          "Alerts"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:394"
        }
      }
    },
    "/api/alerts/{alertId}": {
      "get": {
        "summary": "Get a specific alert",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:480",
          "errorCodes": [
            "ALERT_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/alerts/{alertId}/deliveries": {
      "get": {
        "summary": "Get alert deliveries for an alert",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:359",
          "errorCodes": [
            "ALERT_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/alerts/{alertId}/resolve": {
      "post": {
        "summary": "Resolve an alert",
        "tags": [
          "Alerts"
        ],
        "parameters": [
          {
            "name": "alertId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ALERT_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:528",
          "errorCodes": [
            "ALERT_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/alerts/bulk-resolve": {
      "post": {
        "summary": "Bulk resolve alerts",
        "tags": [
          "Alerts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:577",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/alerts/stats": {
      "get": {
        "summary": "Get alert statistics",
        "tags": [
          "Alerts"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/alerts.ts:641"
        }
      }
    },
    "/api/auth/forgot-password": {
      "post": {
        "summary": "Forgot password ──────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "x-catalyst": {
          "source": "src/routes/auth.ts:659",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/auth/login": {
      "post": {
        "summary": "Login ────────────────────────────────────────────────────────────",
        "description": "Login ────────────────────────────────────────────────────────────\nPer-route cap; DB-backed brute-force lockout remains the enforcement SoT.",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, RATE_LIMITED, AUTH_INVALID_CREDENTIALS, INTERNAL_ERROR."
          }
        },
        "x-catalyst": {
          "source": "src/routes/auth.ts:183",
          "errorCodes": [
            "VALIDATION_ERROR",
            "RATE_LIMITED",
            "AUTH_INVALID_CREDENTIALS",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "summary": "Get current user ─────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: AUTH_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:324",
          "errorCodes": [
            "AUTH_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/auth/profile": {
      "get": {
        "summary": "Profile summary ──────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: AUTH_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:358",
          "errorCodes": [
            "AUTH_USER_NOT_FOUND"
          ]
        }
      },
      "patch": {
        "summary": "Update profile ──────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, AUTH_INVALID_USERNAME, AUTH_USERNAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:433",
          "errorCodes": [
            "VALIDATION_ERROR",
            "AUTH_INVALID_USERNAME",
            "AUTH_USERNAME_TAKEN"
          ]
        }
      }
    },
    "/api/auth/profile/api-keys": {
      "get": {
        "summary": "User's API keys overview ────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:641"
        }
      }
    },
    "/api/auth/profile/audit-log": {
      "get": {
        "summary": "Personal audit log ──────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:568"
        }
      }
    },
    "/api/auth/profile/avatar": {
      "post": {
        "summary": "Avatar upload ───────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:509",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      },
      "delete": {
        "summary": "Remove avatar ───────────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:555"
        }
      }
    },
    "/api/auth/profile/delete": {
      "post": {
        "summary": "Delete own account ─────────────────────────────────────────────",
        "description": "Delete own account ─────────────────────────────────────────────\nUsers can delete their own account if they don't own any servers.\nSub-users (no servers) can delete freely.",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, AUTH_INVALID_CREDENTIALS, AUTH_ACCOUNT_OWNS_SERVERS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:712",
          "errorCodes": [
            "VALIDATION_ERROR",
            "AUTH_INVALID_CREDENTIALS",
            "AUTH_ACCOUNT_OWNS_SERVERS"
          ]
        }
      }
    },
    "/api/auth/profile/export": {
      "get": {
        "summary": "Export account data (GDPR) ──────────────────────────────────────",
        "description": "Export account data (GDPR) ──────────────────────────────────────\nFans out 6 parallel queries per hit: keep a strict per-route cap.",
        "tags": [
          "Auth"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:589"
        }
      }
    },
    "/api/auth/profile/preferences": {
      "patch": {
        "summary": "Update user preferences ─────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:483",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/auth/profile/sso/unlink": {
      "post": {
        "summary": "POST /api/auth/profile/sso/unlink",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, AUTH_ONLY_SIGN_IN_METHOD, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/auth.ts:394",
          "errorCodes": [
            "VALIDATION_ERROR",
            "AUTH_ONLY_SIGN_IN_METHOD",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/auth/register": {
      "post": {
        "summary": "Register ─────────────────────────────────────────────────────────",
        "description": "Register ─────────────────────────────────────────────────────────\nPer-route cap so enumeration/creation abuse is bounded even though the\nglobal limiter is per-process. DB lockout remains the enforcement SoT.",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, AUTH_REGISTRATION_FAILED."
          }
        },
        "x-catalyst": {
          "source": "src/routes/auth.ts:82",
          "errorCodes": [
            "VALIDATION_ERROR",
            "AUTH_REGISTRATION_FAILED"
          ]
        }
      }
    },
    "/api/auth/reset-password/validate": {
      "post": {
        "summary": "Validate reset token ─────────────────────────────────────────────",
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, AUTH_INVALID_RESET_TOKEN."
          }
        },
        "x-catalyst": {
          "source": "src/routes/auth.ts:686",
          "errorCodes": [
            "VALIDATION_ERROR",
            "AUTH_INVALID_RESET_TOKEN"
          ]
        }
      }
    },
    "/api/dashboard/activity": {
      "get": {
        "summary": "Get recent activity",
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/dashboard.ts:106"
        }
      }
    },
    "/api/dashboard/resources": {
      "get": {
        "summary": "Get resource utilization (aggregated across nodes)",
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/dashboard.ts:149"
        }
      }
    },
    "/api/dashboard/stats": {
      "get": {
        "summary": "Get dashboard statistics",
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/dashboard.ts:25"
        }
      }
    },
    "/api/internal/file-tunnel/poll": {
      "get": {
        "summary": "GET /api/internal/file-tunnel/poll",
        "tags": [
          "Internal"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/file-tunnel.ts:67",
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/internal/file-tunnel/response/{requestId}": {
      "post": {
        "summary": "POST /api/internal/file-tunnel/response/:requestId",
        "tags": [
          "Internal"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FILE_TUNNEL_REQUEST_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/file-tunnel.ts:107",
          "errorCodes": [
            "FILE_TUNNEL_REQUEST_NOT_FOUND"
          ]
        }
      }
    },
    "/api/internal/file-tunnel/response/{requestId}/stream": {
      "post": {
        "summary": "POST /api/internal/file-tunnel/response/:requestId/stream",
        "tags": [
          "Internal"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FILE_TOO_LARGE, FILE_TUNNEL_REQUEST_NOT_FOUND."
          }
        },
        "x-catalyst": {
          "source": "src/routes/file-tunnel.ts:150",
          "errorCodes": [
            "FILE_TOO_LARGE",
            "FILE_TUNNEL_REQUEST_NOT_FOUND"
          ]
        }
      }
    },
    "/api/internal/file-tunnel/upload/{requestId}": {
      "get": {
        "summary": "GET /api/internal/file-tunnel/upload/:requestId",
        "tags": [
          "Internal"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FILE_TUNNEL_UPLOAD_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/file-tunnel.ts:209",
          "errorCodes": [
            "FILE_TUNNEL_UPLOAD_NOT_FOUND"
          ]
        }
      }
    },
    "/api/locations": {
      "get": {
        "summary": "List all locations (with node count)",
        "tags": [
          "Locations"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/locations.ts:41"
        }
      },
      "post": {
        "summary": "Create location (admin only)",
        "tags": [
          "Locations"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, LOCATION_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/locations.ts:102",
          "errorCodes": [
            "VALIDATION_ERROR",
            "LOCATION_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/locations/{locationId}": {
      "get": {
        "summary": "Get single location (with nodes)",
        "tags": [
          "Locations"
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: LOCATION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/locations.ts:71",
          "errorCodes": [
            "LOCATION_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "Update location (admin only)",
        "tags": [
          "Locations"
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: LOCATION_NOT_FOUND, LOCATION_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/locations.ts:149",
          "errorCodes": [
            "LOCATION_NOT_FOUND",
            "LOCATION_NAME_TAKEN"
          ]
        }
      },
      "delete": {
        "summary": "Delete location (admin only)",
        "tags": [
          "Locations"
        ],
        "parameters": [
          {
            "name": "locationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: LOCATION_NOT_FOUND, LOCATION_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/locations.ts:204",
          "errorCodes": [
            "LOCATION_NOT_FOUND",
            "LOCATION_IN_USE"
          ]
        }
      }
    },
    "/api/nests": {
      "get": {
        "summary": "List all nests (with template count)",
        "tags": [
          "Nests"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nests.ts:41"
        }
      },
      "post": {
        "summary": "Create nest (admin only)",
        "tags": [
          "Nests"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NEST_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nests.ts:94",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NEST_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/nests/{nestId}": {
      "get": {
        "summary": "Get single nest (with templates)",
        "tags": [
          "Nests"
        ],
        "parameters": [
          {
            "name": "nestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NEST_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nests.ts:67",
          "errorCodes": [
            "NEST_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "Update nest (admin only)",
        "tags": [
          "Nests"
        ],
        "parameters": [
          {
            "name": "nestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NEST_NOT_FOUND, NEST_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nests.ts:145",
          "errorCodes": [
            "NEST_NOT_FOUND",
            "NEST_NAME_TAKEN"
          ]
        }
      },
      "delete": {
        "summary": "Delete nest (admin only, sets templates' nestId to null)",
        "tags": [
          "Nests"
        ],
        "parameters": [
          {
            "name": "nestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NEST_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nests.ts:203",
          "errorCodes": [
            "NEST_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes": {
      "post": {
        "summary": "Using shared prisma instance from db.ts",
        "description": "Using shared prisma instance from db.ts\nCreate node",
        "tags": [
          "Nodes"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_NAME_TAKEN, LOCATION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:158",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_NAME_TAKEN",
            "LOCATION_NOT_FOUND"
          ]
        }
      },
      "get": {
        "summary": "List nodes",
        "tags": [
          "Nodes"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:369"
        }
      }
    },
    "/api/nodes/{nodeId}": {
      "get": {
        "summary": "Get node details",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:418",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "Update node configuration",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND, VALIDATION_ERROR, NODE_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:755",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND",
            "VALIDATION_ERROR",
            "NODE_NAME_TAKEN"
          ]
        }
      },
      "delete": {
        "summary": "Delete node",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND, NODE_HAS_SERVERS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1139",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND",
            "NODE_HAS_SERVERS"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/config": {
      "get": {
        "summary": "Get agent config",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2815",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      },
      "put": {
        "summary": "Update agent config",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, AGENT_CONFIG_REJECTED, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2853",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "AGENT_CONFIG_REJECTED",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/logs": {
      "get": {
        "summary": "Get agent logs (initial batch)",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, WEBSOCKET_GATEWAY_UNAVAILABLE, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2471",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/logs/stream": {
      "get": {
        "summary": "Live agent log tail (SSE) — panel pulls from agent and pushes to browser.",
        "description": "Live agent log tail (SSE) — panel pulls from agent and pushes to browser.\nAgents do not open a dedicated log socket; this is the true stream surface.",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, WEBSOCKET_GATEWAY_UNAVAILABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2511",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "WEBSOCKET_GATEWAY_UNAVAILABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/ping": {
      "post": {
        "summary": "Ping agent",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2775",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/restart": {
      "post": {
        "summary": "Restart agent",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2594",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/status": {
      "get": {
        "summary": "Agent Control Endpoints ────────────────────────────────────────────",
        "description": "Agent Control Endpoints ────────────────────────────────────────────\nGet detailed agent status",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2380",
          "errorCodes": [
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/update": {
      "post": {
        "summary": "Trigger agent update",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, VALIDATION_ERROR, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2641",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "VALIDATION_ERROR",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/agent/update-status": {
      "get": {
        "summary": "Get agent update status",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2721",
          "errorCodes": [
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/allocations": {
      "get": {
        "summary": "Node allocations (Pterodactyl-style)",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1314",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      },
      "post": {
        "summary": "POST /api/nodes/:nodeId/allocations",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1390",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/allocations/{allocationId}": {
      "patch": {
        "summary": "PATCH /api/nodes/:nodeId/allocations/:allocationId",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allocationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ALLOCATION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1455",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ALLOCATION_NOT_FOUND"
          ]
        }
      },
      "delete": {
        "summary": "DELETE /api/nodes/:nodeId/allocations/:allocationId",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allocationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, ALLOCATION_NOT_FOUND, ALLOCATION_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1496",
          "errorCodes": [
            "PERMISSION_DENIED",
            "ALLOCATION_NOT_FOUND",
            "ALLOCATION_IN_USE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/allocations/bulk-delete": {
      "post": {
        "summary": "POST /api/nodes/:nodeId/allocations/bulk-delete",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1528",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/api-key": {
      "get": {
        "summary": "Check if API key exists for agent",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:562",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      },
      "post": {
        "summary": "Generate API key for agent",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND, NODE_API_KEY_EXISTS, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:628",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND",
            "NODE_API_KEY_EXISTS",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/assign": {
      "post": {
        "summary": "Assign node to user or role",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, PERMISSION_DENIED, VALIDATION_ERROR, USER_NOT_FOUND, ROLE_NOT_FOUND, NODE_ASSIGNMENT_EXISTS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1607",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "USER_NOT_FOUND",
            "ROLE_NOT_FOUND",
            "NODE_ASSIGNMENT_EXISTS"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/assignments": {
      "get": {
        "summary": "============================================================================",
        "description": "============================================================================\nNODE ASSIGNMENT ROUTES\n============================================================================\nGet all assignments for a node",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1584",
          "errorCodes": [
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/assignments/{assignmentId}": {
      "delete": {
        "summary": "Remove a node assignment",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_ASSIGNMENT_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1740",
          "errorCodes": [
            "NODE_ASSIGNMENT_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/deployment-token": {
      "post": {
        "summary": "Generate deployment token",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:456",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/heartbeat": {
      "post": {
        "summary": "Update node status (called by agent via heartbeat)",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: UNAUTHORIZED, VALIDATION_ERROR."
          }
        },
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1030",
          "errorCodes": [
            "UNAUTHORIZED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/host-network": {
      "post": {
        "summary": "Enable/disable host networking on the node (agent network policy).",
        "description": "Enable/disable host networking on the node (agent network policy).\nThe agent applies it live and persists it to config.toml, so servers\nusing networkMode \"host\" can start without an agent restart.",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_NOT_FOUND, NODE_OFFLINE, WEBSOCKET_GATEWAY_UNAVAILABLE, NODE_AGENT_UNREACHABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2930",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "WEBSOCKET_GATEWAY_UNAVAILABLE",
            "NODE_AGENT_UNREACHABLE"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/import-server": {
      "post": {
        "summary": "Import a discovered container as a server",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_NOT_FOUND, NODE_CONTAINER_NOT_FOUND, CONFLICT, TEMPLATE_NOT_FOUND, USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2027",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND",
            "NODE_CONTAINER_NOT_FOUND",
            "CONFLICT",
            "TEMPLATE_NOT_FOUND",
            "USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/ip-availability": {
      "get": {
        "summary": "List available IPs from IPAM pool for a node/network",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, VALIDATION_ERROR, NODE_NOT_FOUND, NODE_IP_POOL_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1270",
          "errorCodes": [
            "PERMISSION_DENIED",
            "VALIDATION_ERROR",
            "NODE_NOT_FOUND",
            "NODE_IP_POOL_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/ip-pools": {
      "get": {
        "summary": "List IP pools (macvlan interfaces) for a node",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1224",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/metrics": {
      "get": {
        "summary": "Get node metrics",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/metrics.ts:403",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/stats": {
      "get": {
        "summary": "Get node statistics",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:899",
          "errorCodes": [
            "PERMISSION_DENIED",
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/unregistered-containers": {
      "get": {
        "summary": "============================================================================",
        "description": "============================================================================\nAUTO-IMPORT: UNREGISTERED CONTAINERS\n============================================================================\nGet unregistered containers discovered on a node (containers without DB server records)",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1849",
          "errorCodes": [
            "NODE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/{nodeId}/unregistered-containers/{containerId}/suggest-template": {
      "get": {
        "summary": "Suggest template match for an unregistered container",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "nodeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "containerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NODE_NOT_FOUND, NODE_CONTAINER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1896",
          "errorCodes": [
            "NODE_NOT_FOUND",
            "NODE_CONTAINER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/nodes/accessible": {
      "get": {
        "summary": "Get nodes accessible to current user",
        "description": "Get nodes accessible to current user\nThis endpoint is used by the frontend to populate node selection dropdowns",
        "tags": [
          "Nodes"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:1802"
        }
      }
    },
    "/api/nodes/assign-wildcard": {
      "post": {
        "summary": "============================================================================",
        "description": "============================================================================\nWILDCARD ASSIGNMENT ROUTE\n============================================================================\nAssign all nodes (wildcard) to user or role",
        "tags": [
          "Nodes"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, USER_NOT_FOUND, ROLE_NOT_FOUND, NODE_ASSIGNMENT_EXISTS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2202",
          "errorCodes": [
            "VALIDATION_ERROR",
            "USER_NOT_FOUND",
            "ROLE_NOT_FOUND",
            "NODE_ASSIGNMENT_EXISTS"
          ]
        }
      }
    },
    "/api/nodes/assign-wildcard/{targetType}/{targetId}": {
      "delete": {
        "summary": "Remove wildcard assignment from user or role",
        "tags": [
          "Nodes"
        ],
        "parameters": [
          {
            "name": "targetType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, NODE_ASSIGNMENT_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/nodes.ts:2313",
          "errorCodes": [
            "VALIDATION_ERROR",
            "NODE_ASSIGNMENT_NOT_FOUND"
          ]
        }
      }
    },
    "/api/plugins": {
      "get": {
        "summary": "GET /api/plugins",
        "tags": [
          "Plugins"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:569"
        }
      }
    },
    "/api/plugins/{name}": {
      "get": {
        "summary": "GET /api/plugins/:name",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:618",
          "errorCodes": [
            "PLUGIN_NOT_FOUND"
          ]
        }
      }
    },
    "/api/plugins/{name}/config": {
      "put": {
        "summary": "PUT /api/plugins/:name/config",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PLUGIN_NOT_FOUND, PLUGIN_CONFIG_UPDATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:914",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PLUGIN_NOT_FOUND",
            "PLUGIN_CONFIG_UPDATE_FAILED"
          ]
        }
      }
    },
    "/api/plugins/{name}/enable": {
      "post": {
        "summary": "POST /api/plugins/:name/enable",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PLUGIN_ENABLE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:684",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PLUGIN_ENABLE_FAILED"
          ]
        }
      }
    },
    "/api/plugins/{name}/frontend-manifest": {
      "get": {
        "summary": "GET /api/plugins/:name/frontend-manifest",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_NOT_FOUND, PLUGIN_NO_FRONTEND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:971",
          "errorCodes": [
            "PLUGIN_NOT_FOUND",
            "PLUGIN_NO_FRONTEND"
          ]
        }
      }
    },
    "/api/plugins/{name}/permissions": {
      "put": {
        "summary": "PUT /api/plugins/:name/permissions",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_INVALID_NAME, VALIDATION_ERROR, PLUGIN_NOT_FOUND, PLUGIN_UNDECLARED_PERMISSIONS, PLUGIN_PERMISSIONS_UPDATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:819",
          "errorCodes": [
            "PLUGIN_INVALID_NAME",
            "VALIDATION_ERROR",
            "PLUGIN_NOT_FOUND",
            "PLUGIN_UNDECLARED_PERMISSIONS",
            "PLUGIN_PERMISSIONS_UPDATE_FAILED"
          ]
        }
      }
    },
    "/api/plugins/{name}/reload": {
      "post": {
        "summary": "POST /api/plugins/:name/reload",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_INVALID_NAME, PLUGIN_RELOAD_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:773",
          "errorCodes": [
            "PLUGIN_INVALID_NAME",
            "PLUGIN_RELOAD_FAILED"
          ]
        }
      }
    },
    "/api/plugins/{name}/uninstall": {
      "post": {
        "summary": "POST /api/plugins/:name/uninstall",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_INVALID_NAME, VALIDATION_ERROR, PLUGIN_NOT_FOUND, PLUGIN_UNINSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:443",
          "errorCodes": [
            "PLUGIN_INVALID_NAME",
            "VALIDATION_ERROR",
            "PLUGIN_NOT_FOUND",
            "PLUGIN_UNINSTALL_FAILED"
          ]
        }
      }
    },
    "/api/plugins/install": {
      "post": {
        "summary": "POST /api/plugins/install",
        "tags": [
          "Plugins"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PLUGIN_INSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:385",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PLUGIN_INSTALL_FAILED"
          ]
        }
      }
    },
    "/api/plugins/marketplace": {
      "get": {
        "summary": "GET /api/plugins/marketplace",
        "tags": [
          "Plugins"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:233"
        }
      }
    },
    "/api/plugins/marketplace/sources": {
      "get": {
        "summary": "GET /api/plugins/marketplace/sources",
        "tags": [
          "Plugins"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:261"
        }
      },
      "post": {
        "summary": "POST /api/plugins/marketplace/sources",
        "tags": [
          "Plugins"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PLUGIN_MARKETPLACE_ALREADY_CONFIGURED, PLUGIN_MARKETPLACE_SOURCE_INVALID."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:283",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PLUGIN_MARKETPLACE_ALREADY_CONFIGURED",
            "PLUGIN_MARKETPLACE_SOURCE_INVALID"
          ]
        }
      }
    },
    "/api/plugins/marketplace/sources/{id}": {
      "patch": {
        "summary": "PATCH /api/plugins/marketplace/sources/:id",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PLUGIN_MARKETPLACE_SOURCE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:320",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PLUGIN_MARKETPLACE_SOURCE_NOT_FOUND"
          ]
        }
      },
      "delete": {
        "summary": "DELETE /api/plugins/marketplace/sources/:id",
        "tags": [
          "Plugins"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PLUGIN_MARKETPLACE_SOURCE_MANAGED, PLUGIN_MARKETPLACE_SOURCE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/plugins.ts:351",
          "errorCodes": [
            "PLUGIN_MARKETPLACE_SOURCE_MANAGED",
            "PLUGIN_MARKETPLACE_SOURCE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/providers/status": {
      "get": {
        "summary": "GET /api/providers/status",
        "tags": [
          "Providers"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/provider-keys.ts:14"
        }
      }
    },
    "/api/roles": {
      "get": {
        "summary": "GET /api/roles - List all roles",
        "tags": [
          "Roles"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:189"
        }
      },
      "post": {
        "summary": "POST /api/roles - Create role",
        "tags": [
          "Roles"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PERMISSION_DENIED, ROLE_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:310",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PERMISSION_DENIED",
            "ROLE_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/roles/{roleId}": {
      "get": {
        "summary": "GET /api/roles/:roleId - Get role details",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:224",
          "errorCodes": [
            "ROLE_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "PUT /api/roles/:roleId",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND, ADMIN_SELF_MODIFICATION, ROLE_NAME_TAKEN, VALIDATION_ERROR, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:412",
          "errorCodes": [
            "ROLE_NOT_FOUND",
            "ADMIN_SELF_MODIFICATION",
            "ROLE_NAME_TAKEN",
            "VALIDATION_ERROR",
            "PERMISSION_DENIED"
          ]
        }
      },
      "delete": {
        "summary": "DELETE /api/roles/:roleId",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND, ROLE_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:537",
          "errorCodes": [
            "ROLE_NOT_FOUND",
            "ROLE_IN_USE"
          ]
        }
      }
    },
    "/api/roles/{roleId}/nodes": {
      "get": {
        "summary": "GET /api/roles/:roleId/nodes - Get nodes assigned to a role",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:1017",
          "errorCodes": [
            "ROLE_NOT_FOUND"
          ]
        }
      }
    },
    "/api/roles/{roleId}/permissions": {
      "post": {
        "summary": "POST /api/roles/:roleId/permissions",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, PERMISSION_DENIED, ROLE_NOT_FOUND, ADMIN_SELF_MODIFICATION, ROLE_PERMISSION_EXISTS."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:596",
          "errorCodes": [
            "VALIDATION_ERROR",
            "PERMISSION_DENIED",
            "ROLE_NOT_FOUND",
            "ADMIN_SELF_MODIFICATION",
            "ROLE_PERMISSION_EXISTS"
          ]
        }
      }
    },
    "/api/roles/{roleId}/permissions/*": {
      "delete": {
        "summary": "DELETE /api/roles/:roleId/permissions/:permission - Remove permission from role",
        "description": "DELETE /api/roles/:roleId/permissions/:permission - Remove permission from role\nWe need to encode the permission in the URL path",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, ROLE_NOT_FOUND, ADMIN_SELF_MODIFICATION, ROLE_PERMISSION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:681",
          "errorCodes": [
            "VALIDATION_ERROR",
            "ROLE_NOT_FOUND",
            "ADMIN_SELF_MODIFICATION",
            "ROLE_PERMISSION_NOT_FOUND"
          ]
        }
      }
    },
    "/api/roles/{roleId}/users/{userId}": {
      "post": {
        "summary": "POST /api/roles/:roleId/users/:userId - Assign role to user",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND, ADMIN_USER_NOT_FOUND, ADMIN_SELF_MODIFICATION, PERMISSION_DENIED, ROLE_ALREADY_ASSIGNED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:755",
          "errorCodes": [
            "ROLE_NOT_FOUND",
            "ADMIN_USER_NOT_FOUND",
            "ADMIN_SELF_MODIFICATION",
            "PERMISSION_DENIED",
            "ROLE_ALREADY_ASSIGNED"
          ]
        }
      },
      "delete": {
        "summary": "DELETE /api/roles/:roleId/users/:userId - Remove role from user",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ROLE_NOT_FOUND, ROLE_NOT_ASSIGNED, ADMIN_SELF_MODIFICATION."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:878",
          "errorCodes": [
            "ROLE_NOT_FOUND",
            "ROLE_NOT_ASSIGNED",
            "ADMIN_SELF_MODIFICATION"
          ]
        }
      }
    },
    "/api/roles/presets": {
      "get": {
        "summary": "GET /api/roles/presets - Get available role presets",
        "tags": [
          "Roles"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:998"
        }
      }
    },
    "/api/roles/users/{userId}/nodes": {
      "get": {
        "summary": "GET /api/users/:userId/nodes - Get nodes accessible to a user",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ADMIN_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:1124",
          "errorCodes": [
            "ADMIN_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/roles/users/{userId}/roles": {
      "get": {
        "summary": "GET /api/users/:userId/roles - Get user roles",
        "tags": [
          "Roles"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: ADMIN_USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/roles.ts:948",
          "errorCodes": [
            "ADMIN_USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers": {
      "post": {
        "summary": "POST /api/servers",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, USER_NOT_FOUND, VALIDATION_ERROR, TEMPLATE_NOT_FOUND, SERVER_TEMPLATE_MINIMUM_DISK, SERVER_TEMPLATE_IMAGE_REQUIRED, SERVER_IMAGE_VARIANT_INVALID, SERVER_MISSING_TEMPLATE_VARIABLES, SERVER_VARIABLE_INVALID, SERVER_VARIABLE_PATTERN_INVALID, NODE_NOT_FOUND, INSUFFICIENT_RESOURCES, SERVER_NETWORK_MODE_INVALID, SERVER_NETWORK_IP_INVALID, PORT_ALREADY_IN_USE, ALLOCATION_NOT_FOUND, ALLOCATION_ALREADY_ASSIGNED, SERVER_CREATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:90",
          "errorCodes": [
            "PERMISSION_DENIED",
            "USER_NOT_FOUND",
            "VALIDATION_ERROR",
            "TEMPLATE_NOT_FOUND",
            "SERVER_TEMPLATE_MINIMUM_DISK",
            "SERVER_TEMPLATE_IMAGE_REQUIRED",
            "SERVER_IMAGE_VARIANT_INVALID",
            "SERVER_MISSING_TEMPLATE_VARIABLES",
            "SERVER_VARIABLE_INVALID",
            "SERVER_VARIABLE_PATTERN_INVALID",
            "NODE_NOT_FOUND",
            "INSUFFICIENT_RESOURCES",
            "SERVER_NETWORK_MODE_INVALID",
            "SERVER_NETWORK_IP_INVALID",
            "PORT_ALREADY_IN_USE",
            "ALLOCATION_NOT_FOUND",
            "ALLOCATION_ALREADY_ASSIGNED",
            "SERVER_CREATE_FAILED"
          ]
        }
      },
      "get": {
        "summary": "List user's servers — optimized for max throughput (benchmark hot-path)",
        "description": "List user's servers — optimized for max throughput (benchmark hot-path)\nSupports ?limit &offset &withMetrics=1 (default limit 50, max 100, metrics off)",
        "tags": [
          "Servers"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:1331"
        }
      }
    },
    "/api/servers/{id}/backup-settings": {
      "patch": {
        "summary": "Update backup settings",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:150",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/{id}/reset-crash-count": {
      "post": {
        "summary": "Reset crash count",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:91",
          "errorCodes": [
            "SERVER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{id}/restart-policy": {
      "patch": {
        "summary": "PATCH /api/servers/:id/restart-policy",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:12",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{id}/transfer": {
      "post": {
        "summary": "Transfer server to another node",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_ALREADY_ON_NODE, NODE_NOT_FOUND, NODE_OFFLINE, INSUFFICIENT_RESOURCES, SERVER_NOT_STOPPED, SERVER_TRANSFER_STATE_CHANGED, SERVER_TRANSFER_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:389",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_ALREADY_ON_NODE",
            "NODE_NOT_FOUND",
            "NODE_OFFLINE",
            "INSUFFICIENT_RESOURCES",
            "SERVER_NOT_STOPPED",
            "SERVER_TRANSFER_STATE_CHANGED",
            "SERVER_TRANSFER_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}": {
      "get": {
        "summary": "Get server details",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:1604",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "put": {
        "summary": "Get historical stats for a server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_NOT_STOPPED, VALIDATION_ERROR, INSUFFICIENT_RESOURCES, SERVER_NETWORK_IP_INVALID, PORT_ALREADY_IN_USE, SERVER_NETWORK_MODE_INVALID, ALLOCATION_NOT_FOUND, ALLOCATION_ALREADY_ASSIGNED, SERVER_IMAGE_VARIANT_INVALID."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:1696",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_NOT_STOPPED",
            "VALIDATION_ERROR",
            "INSUFFICIENT_RESOURCES",
            "SERVER_NETWORK_IP_INVALID",
            "PORT_ALREADY_IN_USE",
            "SERVER_NETWORK_MODE_INVALID",
            "ALLOCATION_NOT_FOUND",
            "ALLOCATION_ALREADY_ASSIGNED",
            "SERVER_IMAGE_VARIANT_INVALID"
          ]
        }
      },
      "delete": {
        "summary": "Get server files",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_SUSPENDED, PERMISSION_DENIED, SERVER_NOT_STOPPED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:2270",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "PERMISSION_DENIED",
            "SERVER_NOT_STOPPED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/access": {
      "post": {
        "summary": "Add or update server access",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_OWNER_ACCESS_PROTECTED, USER_NOT_FOUND, SERVER_PERMISSIONS_NOT_GRANTABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:621",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_OWNER_ACCESS_PROTECTED",
            "USER_NOT_FOUND",
            "SERVER_PERMISSIONS_NOT_GRANTABLE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/access/{targetUserId}": {
      "delete": {
        "summary": "Remove server access",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_OWNER_ACCESS_PROTECTED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:712",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_OWNER_ACCESS_PROTECTED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/activity": {
      "get": {
        "summary": "Update server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/stats.ts:109",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/allocations": {
      "get": {
        "summary": "GET /api/servers/:serverId/allocations",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/network.ts:33",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "post": {
        "summary": "Add allocation (hot-add supported for running servers)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_STATE_TRANSITION_INVALID, ALLOCATION_NOT_FOUND, ALLOCATION_ALREADY_ASSIGNED, VALIDATION_ERROR, PORT_ALREADY_IN_USE, ALLOCATION_CONFLICT."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/network.ts:106",
          "permissionGuards": [
            "Permission"
          ],
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_STATE_TRANSITION_INVALID",
            "ALLOCATION_NOT_FOUND",
            "ALLOCATION_ALREADY_ASSIGNED",
            "VALIDATION_ERROR",
            "PORT_ALREADY_IN_USE",
            "ALLOCATION_CONFLICT"
          ]
        }
      }
    },
    "/api/servers/{serverId}/allocations/{containerPort}": {
      "delete": {
        "summary": "Remove allocation (hot-remove supported for running servers)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "containerPort",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_STATE_TRANSITION_INVALID, VALIDATION_ERROR, ALLOCATION_PRIMARY_IMMUTABLE, ALLOCATION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/network.ts:348",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_STATE_TRANSITION_INVALID",
            "VALIDATION_ERROR",
            "ALLOCATION_PRIMARY_IMMUTABLE",
            "ALLOCATION_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/allocations/primary": {
      "post": {
        "summary": "Set primary allocation (allowed when running — no firewall change needed, just metadata swap)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_STATE_TRANSITION_INVALID, VALIDATION_ERROR, ALLOCATION_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/network.ts:474",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_STATE_TRANSITION_INVALID",
            "VALIDATION_ERROR",
            "ALLOCATION_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/archive": {
      "post": {
        "summary": "Archive server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_ALREADY_ARCHIVED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:933",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_ALREADY_ARCHIVED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/backups": {
      "post": {
        "summary": "Create a backup",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, GATEWAY_NOT_AVAILABLE, SERVER_SUSPENDED, BACKUP_CREATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:111",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_SUSPENDED",
            "BACKUP_CREATE_FAILED"
          ]
        }
      },
      "get": {
        "summary": "List backups for a server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_SUSPENDED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:177",
          "errorCodes": [
            "SERVER_SUSPENDED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/backups/{backupId}": {
      "get": {
        "summary": "Get a specific backup",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "backupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: BACKUP_NOT_FOUND, SERVER_SUSPENDED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:266",
          "errorCodes": [
            "BACKUP_NOT_FOUND",
            "SERVER_SUSPENDED"
          ]
        }
      },
      "delete": {
        "summary": "Delete a backup",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "backupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: BACKUP_NOT_FOUND, SERVER_NOT_FOUND, SERVER_SUSPENDED, GATEWAY_NOT_AVAILABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:448",
          "errorCodes": [
            "BACKUP_NOT_FOUND",
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "GATEWAY_NOT_AVAILABLE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/backups/{backupId}/download": {
      "get": {
        "summary": "Download a backup",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "backupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: BACKUP_NOT_FOUND, SERVER_NOT_FOUND, SERVER_SUSPENDED, BACKUP_DOWNLOAD_FAILED, BACKUP_FILE_NOT_FOUND, GATEWAY_NOT_AVAILABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:520",
          "errorCodes": [
            "BACKUP_NOT_FOUND",
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "BACKUP_DOWNLOAD_FAILED",
            "BACKUP_FILE_NOT_FOUND",
            "GATEWAY_NOT_AVAILABLE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/backups/{backupId}/restore": {
      "post": {
        "summary": "Restore from backup",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "backupId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_SUSPENDED, BACKUP_NOT_FOUND, RESTORE_ALREADY_IN_PROGRESS, SERVER_NOT_STOPPED, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, BACKUP_STORAGE_KEY_MISSING, BACKUP_DOWNLOAD_FAILED, BACKUP_ENCRYPTION_KEY_MISSING, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/backups.ts:309",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "BACKUP_NOT_FOUND",
            "RESTORE_ALREADY_IN_PROGRESS",
            "SERVER_NOT_STOPPED",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "BACKUP_STORAGE_KEY_MISSING",
            "BACKUP_DOWNLOAD_FAILED",
            "BACKUP_ENCRYPTION_KEY_MISSING",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/cancel-install": {
      "post": {
        "summary": "Cancel a stuck install (kills the installer container and resets status so",
        "description": "Cancel a stuck install (kills the installer container and resets status so\nthe server can be reinstalled). Only valid from `installing`.",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_NOT_INSTALLING, GATEWAY_NOT_AVAILABLE, SERVER_STATE_TRANSITION_INVALID."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:451",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_NOT_INSTALLING",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_STATE_TRANSITION_INVALID"
          ]
        }
      }
    },
    "/api/servers/{serverId}/clone": {
      "post": {
        "summary": "Clone a server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED, SERVER_NOT_FOUND, USER_NOT_FOUND, TEMPLATE_NOT_FOUND, SERVER_TEMPLATE_IMAGE_REQUIRED, SERVER_MISSING_TEMPLATE_VARIABLES, SERVER_VARIABLE_INVALID, SERVER_VARIABLE_PATTERN_INVALID, SERVER_VARIABLE_VALIDATION_TIMEOUT, NODE_NOT_FOUND, INSUFFICIENT_RESOURCES, SERVER_NETWORK_IP_INVALID, SERVER_NETWORK_MODE_INVALID, ALLOCATION_NOT_FOUND, ALLOCATION_ALREADY_ASSIGNED, SERVER_CLONE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:671",
          "errorCodes": [
            "PERMISSION_DENIED",
            "SERVER_NOT_FOUND",
            "USER_NOT_FOUND",
            "TEMPLATE_NOT_FOUND",
            "SERVER_TEMPLATE_IMAGE_REQUIRED",
            "SERVER_MISSING_TEMPLATE_VARIABLES",
            "SERVER_VARIABLE_INVALID",
            "SERVER_VARIABLE_PATTERN_INVALID",
            "SERVER_VARIABLE_VALIDATION_TIMEOUT",
            "NODE_NOT_FOUND",
            "INSUFFICIENT_RESOURCES",
            "SERVER_NETWORK_IP_INVALID",
            "SERVER_NETWORK_MODE_INVALID",
            "ALLOCATION_NOT_FOUND",
            "ALLOCATION_ALREADY_ASSIGNED",
            "SERVER_CLONE_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/cs2/frameworks": {
      "get": {
        "summary": "List available CS2 frameworks and their install state",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:189"
        }
      }
    },
    "/api/servers/{serverId}/cs2/frameworks/{frameworkId}/install": {
      "post": {
        "summary": "Install a framework release",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FRAMEWORK_NOT_FOUND, VALIDATION_ERROR, FRAMEWORK_MISSING_DEPENDENCIES, ALLOCATION_CONFLICT."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:260",
          "errorCodes": [
            "FRAMEWORK_NOT_FOUND",
            "VALIDATION_ERROR",
            "FRAMEWORK_MISSING_DEPENDENCIES",
            "ALLOCATION_CONFLICT"
          ]
        }
      }
    },
    "/api/servers/{serverId}/cs2/frameworks/{frameworkId}/releases": {
      "get": {
        "summary": "List releases for a framework (paginated)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FRAMEWORK_NOT_FOUND, FRAMEWORK_RELEASES_FETCH_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:223",
          "errorCodes": [
            "FRAMEWORK_NOT_FOUND",
            "FRAMEWORK_RELEASES_FETCH_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/cs2/frameworks/{frameworkId}/uninstall": {
      "post": {
        "summary": "Uninstall framework (removes known paths)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "frameworkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FRAMEWORK_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:365",
          "errorCodes": [
            "FRAMEWORK_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/cs2/plugins": {
      "get": {
        "summary": "CS2 plugins: list installed plugins from addons/counterstrikesharp/plugins",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:439"
        }
      }
    },
    "/api/servers/{serverId}/cs2/plugins/uninstall": {
      "post": {
        "summary": "CS2 plugins: uninstall a plugin folder/file under addons/counterstrikesharp/plugins",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_UNINSTALL_FAILED, FRAMEWORK_DOWNLOAD_FAILED, FRAMEWORK_EXTRACT_FAILED, FRAMEWORK_INSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/cs2.ts:470",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_UNINSTALL_FAILED",
            "FRAMEWORK_DOWNLOAD_FAILED",
            "FRAMEWORK_EXTRACT_FAILED",
            "FRAMEWORK_INSTALL_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/databases": {
      "get": {
        "summary": "GET /api/servers/:serverId/databases",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/databases.ts:41"
        }
      },
      "post": {
        "summary": "Create server database",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, DATABASE_HOST_NOT_AUTHORIZED, DATABASE_ALLOCATION_DISABLED, DATABASE_LIMIT_REACHED, DATABASE_HOST_NOT_FOUND, DATABASE_NAME_INVALID, CREDENTIAL_ENCRYPTION_KEY_MISSING, DATABASE_CREDENTIALS_INVALID, DATABASE_PROVISION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/databases.ts:94",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "DATABASE_HOST_NOT_AUTHORIZED",
            "DATABASE_ALLOCATION_DISABLED",
            "DATABASE_LIMIT_REACHED",
            "DATABASE_HOST_NOT_FOUND",
            "DATABASE_NAME_INVALID",
            "CREDENTIAL_ENCRYPTION_KEY_MISSING",
            "DATABASE_CREDENTIALS_INVALID",
            "DATABASE_PROVISION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/databases/{databaseId}": {
      "delete": {
        "summary": "Delete server database",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "databaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: DATABASE_NOT_FOUND, DATABASE_HOST_NOT_FOUND, DATABASE_HOST_MISMATCH, DATABASE_DELETE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/databases.ts:371",
          "errorCodes": [
            "DATABASE_NOT_FOUND",
            "DATABASE_HOST_NOT_FOUND",
            "DATABASE_HOST_MISMATCH",
            "DATABASE_DELETE_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/databases/{databaseId}/rotate": {
      "post": {
        "summary": "Rotate server database password",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "databaseId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: DATABASE_NOT_FOUND, DATABASE_HOST_MISMATCH, CREDENTIAL_ENCRYPTION_KEY_MISSING, DATABASE_ROTATE_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/databases.ts:266",
          "errorCodes": [
            "DATABASE_NOT_FOUND",
            "DATABASE_HOST_MISMATCH",
            "CREDENTIAL_ENCRYPTION_KEY_MISSING",
            "DATABASE_ROTATE_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files": {
      "get": {
        "summary": "GET /api/servers/:serverId/files",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:104",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/archive-contents": {
      "post": {
        "summary": "List archive contents (without extracting)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:449",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/compress": {
      "post": {
        "summary": "Compress files",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_OPERATION_FAILED, SERVER_NETWORK_IP_INVALID."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:344",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_OPERATION_FAILED",
            "SERVER_NETWORK_IP_INVALID"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/create": {
      "post": {
        "summary": "Create file or directory",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:290",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/decompress": {
      "post": {
        "summary": "Decompress archive",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_OPERATION_FAILED, SERVER_NETWORK_IP_INVALID."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:397",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_OPERATION_FAILED",
            "SERVER_NETWORK_IP_INVALID"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/delete": {
      "delete": {
        "summary": "Delete file or directory",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:686",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/download": {
      "get": {
        "summary": "Get valid game version tags for a provider (used for autocomplete)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:148",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/permissions": {
      "post": {
        "summary": "Update file permissions",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:616",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/rename": {
      "post": {
        "summary": "Rename / move file or directory",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:740",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/upload": {
      "post": {
        "summary": "Upload server file",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED, FILE_TOO_LARGE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:195",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED",
            "FILE_TOO_LARGE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/files/write": {
      "post": {
        "summary": "Write/update file content",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, FILE_INVALID_PATH, FILE_OPERATION_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:552",
          "permissionGuards": [
            "FileAccess"
          ],
          "errorCodes": [
            "VALIDATION_ERROR",
            "FILE_INVALID_PATH",
            "FILE_OPERATION_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/install": {
      "post": {
        "summary": "POST /api/servers/:serverId/install",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, SERVER_NETWORK_IP_INVALID, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:150",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_NETWORK_IP_INVALID",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/invites": {
      "get": {
        "summary": "List pending server invites",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:52",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "post": {
        "summary": "Create invite",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_ACCESS_ALREADY_GRANTED, SERVER_PERMISSIONS_NOT_GRANTABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:82",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_ACCESS_ALREADY_GRANTED",
            "SERVER_PERMISSIONS_NOT_GRANTABLE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/invites/{inviteId}": {
      "delete": {
        "summary": "Cancel invite",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, INVITE_NOT_FOUND, INVITE_NOT_ACTIVE, INVITE_EXPIRED, INVITE_NOT_VALID_FOR_ACCOUNT."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:313",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "INVITE_NOT_FOUND",
            "INVITE_NOT_ACTIVE",
            "INVITE_EXPIRED",
            "INVITE_NOT_VALID_FOR_ACCOUNT"
          ]
        }
      }
    },
    "/api/servers/{serverId}/invites/{inviteId}/regenerate": {
      "post": {
        "summary": "Regenerate a pending invite's link (new token + fresh expiry) — for when",
        "description": "Regenerate a pending invite's link (new token + fresh expiry) — for when\nthe original link was lost or SMTP was not configured at creation time.",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, INVITE_NOT_FOUND, INVITE_NOT_PENDING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:233",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "INVITE_NOT_FOUND",
            "INVITE_NOT_PENDING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/kill": {
      "post": {
        "summary": "Kill server (force stop command to agent)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:1090",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/logs": {
      "get": {
        "summary": "Get server logs",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/files.ts:502",
          "permissionGuards": [
            "FileAccess"
          ]
        }
      }
    },
    "/api/servers/{serverId}/metrics": {
      "get": {
        "summary": "Using shared prisma instance from db.ts",
        "description": "Using shared prisma instance from db.ts\nGet server metrics",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_SUSPENDED, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/metrics.ts:19",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/check-updates": {
      "post": {
        "summary": "Check for updates on installed mods",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: MOD_PROVIDER_API_KEY_MISSING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1148",
          "errorCodes": [
            "MOD_PROVIDER_API_KEY_MISSING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/game-versions": {
      "get": {
        "summary": "GET /api/servers/:serverId/mod-manager/game-versions",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:50",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/install": {
      "post": {
        "summary": "POST /api/servers/:serverId/mod-manager/install",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_TARGET_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_PROVIDER_ERROR, MOD_DOWNLOAD_ASSET_UNRESOLVED, MOD_INSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:319",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_TARGET_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_PROVIDER_ERROR",
            "MOD_DOWNLOAD_ASSET_UNRESOLVED",
            "MOD_INSTALL_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/installed": {
      "get": {
        "summary": "List installed mods/plugins in a target directory",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:922"
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/search": {
      "get": {
        "summary": "GET /api/servers/:serverId/mod-manager/search",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_TARGET_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_METADATA_RESOLVE_FAILED, MOD_GAME_METADATA_UNRESOLVED, MOD_PROVIDER_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:111",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_TARGET_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_METADATA_RESOLVE_FAILED",
            "MOD_GAME_METADATA_UNRESOLVED",
            "MOD_PROVIDER_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/uninstall": {
      "post": {
        "summary": "Uninstall (delete) a mod from the server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_UNINSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1021",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_UNINSTALL_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/update": {
      "post": {
        "summary": "Update a specific mod to its latest version",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_API_KEY_MISSING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1372",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_API_KEY_MISSING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/mod-manager/versions": {
      "get": {
        "summary": "GET /api/servers/:serverId/mod-manager/versions",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_PROVIDER_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:257",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_PROVIDER_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/permissions": {
      "get": {
        "summary": "GET /api/servers/:serverId/permissions",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:13",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/check-updates": {
      "post": {
        "summary": "Check for updates on installed plugins",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: MOD_PROVIDER_API_KEY_MISSING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1265",
          "errorCodes": [
            "MOD_PROVIDER_API_KEY_MISSING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/game-versions": {
      "get": {
        "summary": "Get valid game version tags for a provider (used for autocomplete)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:480",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/install": {
      "post": {
        "summary": "POST /api/servers/:serverId/plugin-manager/install",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_PROVIDER_ERROR, MOD_PROVIDER_UNSUPPORTED, MOD_DOWNLOAD_ASSET_UNRESOLVED, MOD_INSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:723",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_PROVIDER_ERROR",
            "MOD_PROVIDER_UNSUPPORTED",
            "MOD_DOWNLOAD_ASSET_UNRESOLVED",
            "MOD_INSTALL_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/installed": {
      "get": {
        "summary": "GET /api/servers/:serverId/plugin-manager/installed",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:972"
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/search": {
      "get": {
        "summary": "GET /api/servers/:serverId/plugin-manager/search",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_PROVIDER_UNSUPPORTED, MOD_PROVIDER_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:536",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_PROVIDER_UNSUPPORTED",
            "MOD_PROVIDER_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/uninstall": {
      "post": {
        "summary": "Uninstall (delete) a plugin from the server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_UNINSTALL_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1086",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_UNINSTALL_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/update": {
      "post": {
        "summary": "Update a specific plugin to its latest version",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_API_KEY_MISSING."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:1513",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_API_KEY_MISSING"
          ]
        }
      }
    },
    "/api/servers/{serverId}/plugin-manager/versions": {
      "get": {
        "summary": "GET /api/servers/:serverId/plugin-manager/versions",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, MOD_PROVIDER_NOT_ENABLED, MOD_PROVIDER_NOT_FOUND, MOD_PROVIDER_API_KEY_MISSING, MOD_PROVIDER_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/mod-plugins.ts:661",
          "errorCodes": [
            "VALIDATION_ERROR",
            "MOD_PROVIDER_NOT_ENABLED",
            "MOD_PROVIDER_NOT_FOUND",
            "MOD_PROVIDER_API_KEY_MISSING",
            "MOD_PROVIDER_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/rebuild": {
      "post": {
        "summary": "Rebuild server (stops server, removes container, recreates from image, preserves data)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, SERVER_NETWORK_IP_INVALID, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:618",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_NETWORK_IP_INVALID",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/reinstall": {
      "post": {
        "summary": "Reinstall server (stops server, wipes data, runs install script)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, SERVER_NETWORK_IP_INVALID, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:301",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_NETWORK_IP_INVALID",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/restart": {
      "post": {
        "summary": "Restart server (stop then start)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, SERVER_NETWORK_IP_INVALID, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:1218",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_NETWORK_IP_INVALID",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/restore": {
      "post": {
        "summary": "Restore server from archive",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_NOT_ARCHIVED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:1020",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_NOT_ARCHIVED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/start": {
      "post": {
        "summary": "Start server (sends start command to agent)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, SERVER_NETWORK_IP_INVALID, HOST_NETWORK_DISABLED, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:757",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "SERVER_NETWORK_IP_INVALID",
            "HOST_NETWORK_DISABLED",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/stats": {
      "get": {
        "summary": "Get current server stats (latest only)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_SUSPENDED, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/metrics.ts:281",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_SUSPENDED",
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/stats/history": {
      "get": {
        "summary": "GET /api/servers/:serverId/stats/history",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/stats.ts:9",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/stop": {
      "post": {
        "summary": "Stop server (sends stop command to agent)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_STATE_TRANSITION_INVALID, NODE_OFFLINE, GATEWAY_NOT_AVAILABLE, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:957",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_STATE_TRANSITION_INVALID",
            "NODE_OFFLINE",
            "GATEWAY_NOT_AVAILABLE",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/storage/resize": {
      "post": {
        "summary": "Resize server storage (grow online, shrink requires stop)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED, SERVER_NOT_STOPPED, GATEWAY_NOT_AVAILABLE, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/core.ts:2132",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "SERVER_NOT_STOPPED",
            "GATEWAY_NOT_AVAILABLE",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/suspend": {
      "post": {
        "summary": "List port allocations",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_ALREADY_SUSPENDED, SERVER_STATE_TRANSITION_INVALID, GATEWAY_NOT_AVAILABLE, NODE_OFFLINE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:1388",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_ALREADY_SUSPENDED",
            "SERVER_STATE_TRANSITION_INVALID",
            "GATEWAY_NOT_AVAILABLE",
            "NODE_OFFLINE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/tasks": {
      "post": {
        "summary": "Create a scheduled task",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, TASK_INVALID_CRON, TASK_INVALID_ACTION, SERVER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:117",
          "errorCodes": [
            "VALIDATION_ERROR",
            "TASK_INVALID_CRON",
            "TASK_INVALID_ACTION",
            "SERVER_NOT_FOUND"
          ]
        }
      },
      "get": {
        "summary": "List scheduled tasks for a server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:211"
        }
      }
    },
    "/api/servers/{serverId}/tasks/{taskId}": {
      "get": {
        "summary": "Get a specific task",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TASK_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:236",
          "errorCodes": [
            "TASK_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "Update a scheduled task",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, TASK_INVALID_ACTION, TASK_INVALID_CRON, TASK_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:267",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "TASK_INVALID_ACTION",
            "TASK_INVALID_CRON",
            "TASK_NOT_FOUND"
          ]
        }
      },
      "delete": {
        "summary": "Delete a scheduled task",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TASK_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:380",
          "errorCodes": [
            "TASK_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/tasks/{taskId}/execute": {
      "post": {
        "summary": "Execute a task immediately (one-time run)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TASK_NOT_FOUND, SERVER_NOT_FOUND, TASK_SCHEDULER_UNAVAILABLE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/tasks.ts:427",
          "errorCodes": [
            "TASK_NOT_FOUND",
            "SERVER_NOT_FOUND",
            "TASK_SCHEDULER_UNAVAILABLE"
          ]
        }
      }
    },
    "/api/servers/{serverId}/transfer-candidates": {
      "get": {
        "summary": "Search users eligible as transfer-ownership targets (owner or admin.write)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:769",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/{serverId}/transfer-ownership": {
      "post": {
        "summary": "Transfer ownership",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, PERMISSION_DENIED, USER_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/admin-ops.ts:820",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "USER_NOT_FOUND"
          ]
        }
      }
    },
    "/api/servers/{serverId}/unsuspend": {
      "post": {
        "summary": "Unsuspend server",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, SERVER_NOT_SUSPENDED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:1537",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "SERVER_NOT_SUSPENDED"
          ]
        }
      }
    },
    "/api/servers/{serverId}/variables": {
      "get": {
        "summary": "GET /api/servers/:serverId/variables",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/variables.ts:9",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED"
          ]
        }
      },
      "patch": {
        "summary": "PATCH /api/servers/:serverId/variables",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "serverId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SERVER_NOT_FOUND, PERMISSION_DENIED, VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/variables.ts:62",
          "errorCodes": [
            "SERVER_NOT_FOUND",
            "PERMISSION_DENIED",
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/bulk": {
      "delete": {
        "summary": "DELETE /api/servers/bulk",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/bulk-servers.ts:415",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/bulk/status": {
      "post": {
        "summary": "POST /api/servers/bulk/status",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/bulk-servers.ts:591",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/bulk/suspend": {
      "post": {
        "summary": "POST /api/servers/bulk/suspend",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/bulk-servers.ts:97",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/bulk/unsuspend": {
      "post": {
        "summary": "POST /api/servers/bulk/unsuspend",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/bulk-servers.ts:271",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/database-hosts": {
      "get": {
        "summary": "Static path — must not be captured by GET /:serverId",
        "tags": [
          "Servers"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: PERMISSION_DENIED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/databases.ts:10",
          "errorCodes": [
            "PERMISSION_DENIED"
          ]
        }
      }
    },
    "/api/servers/eula": {
      "post": {
        "summary": "Respond to EULA prompt (accept or decline)",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, SERVER_NOT_FOUND, GATEWAY_NOT_AVAILABLE, AGENT_COMMAND_FAILED."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/power.ts:554",
          "errorCodes": [
            "VALIDATION_ERROR",
            "SERVER_NOT_FOUND",
            "GATEWAY_NOT_AVAILABLE",
            "AGENT_COMMAND_FAILED"
          ]
        }
      }
    },
    "/api/servers/invites/{token}": {
      "get": {
        "summary": "Invite preview (for invite signup flow)",
        "tags": [
          "Servers"
        ],
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, INVITE_NOT_FOUND, INVITE_NOT_ACTIVE, INVITE_EXPIRED."
          }
        },
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:580",
          "errorCodes": [
            "VALIDATION_ERROR",
            "INVITE_NOT_FOUND",
            "INVITE_NOT_ACTIVE",
            "INVITE_EXPIRED"
          ]
        }
      }
    },
    "/api/servers/invites/accept": {
      "post": {
        "summary": "Accept invite (authenticated)",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:466",
          "errorCodes": [
            "VALIDATION_ERROR"
          ]
        }
      }
    },
    "/api/servers/invites/register": {
      "post": {
        "summary": "Accept invite + register",
        "tags": [
          "Servers"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: VALIDATION_ERROR, INVITE_NOT_FOUND, INVITE_NOT_ACTIVE, INVITE_EXPIRED, CONFLICT, REGISTRATION_FAILED."
          }
        },
        "x-catalyst": {
          "source": "src/routes/servers/invites.ts:487",
          "errorCodes": [
            "VALIDATION_ERROR",
            "INVITE_NOT_FOUND",
            "INVITE_NOT_ACTIVE",
            "INVITE_EXPIRED",
            "CONFLICT",
            "REGISTRATION_FAILED"
          ]
        }
      }
    },
    "/api/settings/locale": {
      "get": {
        "summary": "GET /api/settings/locale",
        "tags": [
          "Settings"
        ],
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "x-catalyst": {
          "source": "src/routes/settings.ts:12"
        }
      }
    },
    "/api/setup/complete": {
      "post": {
        "summary": "POST /api/setup/complete",
        "tags": [
          "Setup"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: SETUP_ALREADY_COMPLETED, VALIDATION_ERROR, SETUP_OPERATOR_VERIFICATION_FAILED, INTERNAL_ERROR."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/setup.ts:267",
          "errorCodes": [
            "SETUP_ALREADY_COMPLETED",
            "VALIDATION_ERROR",
            "SETUP_OPERATOR_VERIFICATION_FAILED",
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/setup/status": {
      "get": {
        "summary": "Check if setup is needed ───────────────────────────────────────",
        "tags": [
          "Setup"
        ],
        "responses": {
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: INTERNAL_ERROR."
          }
        },
        "x-catalyst": {
          "source": "src/routes/setup.ts:102",
          "errorCodes": [
            "INTERNAL_ERROR"
          ]
        }
      }
    },
    "/api/templates": {
      "get": {
        "summary": "Using shared prisma instance from db.ts",
        "description": "Using shared prisma instance from db.ts\nList all templates — optimized for max throughput (benchmark hot-path)\nSupports ?limit &offset &nestId &full=1 (full includes installScript).\nWhen no limit is provided, returns all templates (backwards-compatible with frontend list view).",
        "tags": [
          "Templates"
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:167"
        }
      },
      "post": {
        "summary": "Create template (admin only)",
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TEMPLATE_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:254",
          "errorCodes": [
            "TEMPLATE_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/templates/{templateId}": {
      "get": {
        "summary": "Get template details",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TEMPLATE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:223",
          "errorCodes": [
            "TEMPLATE_NOT_FOUND"
          ]
        }
      },
      "put": {
        "summary": "Update template",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TEMPLATE_NOT_FOUND."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:374",
          "errorCodes": [
            "TEMPLATE_NOT_FOUND"
          ]
        }
      },
      "delete": {
        "summary": "Delete template",
        "tags": [
          "Templates"
        ],
        "parameters": [
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: TEMPLATE_IN_USE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:508",
          "errorCodes": [
            "TEMPLATE_IN_USE"
          ]
        }
      }
    },
    "/api/templates/import-pterodactyl": {
      "post": {
        "summary": "Import Pterodactyl egg (single) — uses structured error-returning API",
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NEST_NOT_FOUND, IMPORT_INVALID_FORMAT, IMPORT_CONVERSION_FAILED, TEMPLATE_NAME_TAKEN."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:547",
          "errorCodes": [
            "NEST_NOT_FOUND",
            "IMPORT_INVALID_FORMAT",
            "IMPORT_CONVERSION_FAILED",
            "TEMPLATE_NAME_TAKEN"
          ]
        }
      }
    },
    "/api/templates/import-pterodactyl-batch": {
      "post": {
        "summary": "Import all Pterodactyl game eggs from GitHub (batch with partial-failure)",
        "tags": [
          "Templates"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Unauthenticated."
          },
          "403": {
            "description": "Forbidden (`PERMISSION_DENIED`) — missing permission."
          },
          "2xx": {
            "description": "Success (envelope: `{ success, data }`) — see endpoint notes."
          },
          "4xx": {
            "description": "Documented codes in this handler: NEST_NOT_FOUND, VALIDATION_ERROR, IMPORT_FETCH_FAILED, IMPORT_IN_PROGRESS, IMPORT_PARTIAL_FAILURE."
          }
        },
        "security": [
          {
            "bearerAuth": [],
            "cookieAuth": []
          }
        ],
        "x-catalyst": {
          "source": "src/routes/templates.ts:664",
          "errorCodes": [
            "NEST_NOT_FOUND",
            "VALIDATION_ERROR",
            "IMPORT_FETCH_FAILED",
            "IMPORT_IN_PROGRESS",
            "IMPORT_PARTIAL_FAILURE"
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Admin/user API key."
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "session",
        "description": "Panel session cookie."
      }
    },
    "responses": {
      "Error": {
        "description": "Standard error envelope.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "success",
                "error",
                "code"
              ],
              "properties": {
                "success": {
                  "type": "boolean",
                  "const": false
                },
                "error": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "description": "Stable machine-readable code — branch on this."
                }
              }
            }
          }
        }
      }
    }
  }
}
