From 4bc48afbf830b1d4b03ab9c4bba0c7d08d0a18aa Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Tue, 17 Mar 2026 16:37:43 +0100 Subject: [PATCH] chore: regenerate OpenAPI spec and TypeScript types for admin endpoints Downloaded from deployed feature branch server. Patched PositionedNode to include children field (missing from server-generated spec). Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/src/api/openapi.json | 1017 ++++++++++++++++++++++++++++++++++++++- ui/src/api/schema.d.ts | 869 ++++++++++++++++++++++++++++++++- 2 files changed, 1851 insertions(+), 35 deletions(-) diff --git a/ui/src/api/openapi.json b/ui/src/api/openapi.json index 8b8028ef..9e06c159 100644 --- a/ui/src/api/openapi.json +++ b/ui/src/api/openapi.json @@ -4,7 +4,12 @@ "title": "Cameleer3 Server API", "version": "1.0" }, - "servers": [], + "servers": [ + { + "url": "/api/v1", + "description": "Relative" + } + ], "security": [ { "bearer": [] @@ -12,8 +17,12 @@ ], "tags": [ { - "name": "Agent SSE", - "description": "Server-Sent Events endpoint for agent communication" + "name": "Database Admin", + "description": "Database monitoring and management (ADMIN only)" + }, + { + "name": "Threshold Admin", + "description": "Monitoring threshold configuration (ADMIN only)" }, { "name": "Agent Commands", @@ -27,10 +36,6 @@ "name": "Agent Management", "description": "Agent registration and lifecycle endpoints" }, - { - "name": "Ingestion", - "description": "Data ingestion endpoints" - }, { "name": "Authentication", "description": "Login and token refresh endpoints" @@ -39,17 +44,33 @@ "name": "OIDC Config Admin", "description": "OIDC provider configuration (ADMIN only)" }, + { + "name": "Search", + "description": "Transaction search endpoints" + }, + { + "name": "Agent SSE", + "description": "Server-Sent Events endpoint for agent communication" + }, + { + "name": "Ingestion", + "description": "Data ingestion endpoints" + }, + { + "name": "Audit Log", + "description": "Audit log viewer (ADMIN only)" + }, { "name": "Diagrams", "description": "Diagram rendering endpoints" }, { - "name": "Detail", - "description": "Execution detail and processor snapshot endpoints" + "name": "OpenSearch Admin", + "description": "OpenSearch monitoring and management (ADMIN only)" }, { - "name": "Search", - "description": "Transaction search endpoints" + "name": "Detail", + "description": "Execution detail and processor snapshot endpoints" } ], "paths": { @@ -90,6 +111,56 @@ } } }, + "/admin/thresholds": { + "get": { + "tags": [ + "Threshold Admin" + ], + "summary": "Get current threshold configuration", + "operationId": "getThresholds", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ThresholdConfig" + } + } + } + } + } + }, + "put": { + "tags": [ + "Threshold Admin" + ], + "summary": "Update threshold configuration", + "operationId": "updateThresholds", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThresholdConfigRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ThresholdConfig" + } + } + } + } + } + } + }, "/admin/oidc": { "get": { "tags": [ @@ -373,9 +444,6 @@ "responses": { "202": { "description": "Data accepted for processing" - }, - "503": { - "description": "Buffer full, retry later" } } } @@ -401,9 +469,6 @@ "responses": { "202": { "description": "Data accepted for processing" - }, - "503": { - "description": "Buffer full, retry later" } } } @@ -916,6 +981,31 @@ } } }, + "/admin/database/queries/{pid}/kill": { + "post": { + "tags": [ + "Database Admin" + ], + "summary": "Terminate a query by PID", + "operationId": "killQuery", + "parameters": [ + { + "name": "pid", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } + }, "/search/stats": { "get": { "tags": [ @@ -1175,7 +1265,14 @@ } }, "404": { - "description": "No diagram found for the given group and route" + "description": "No diagram found for the given group and route", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DiagramLayout" + } + } + } } } } @@ -1458,6 +1555,338 @@ } } } + }, + "/admin/opensearch/status": { + "get": { + "tags": [ + "OpenSearch Admin" + ], + "summary": "Get OpenSearch cluster status and version", + "operationId": "getStatus", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/OpenSearchStatusResponse" + } + } + } + } + } + } + }, + "/admin/opensearch/pipeline": { + "get": { + "tags": [ + "OpenSearch Admin" + ], + "summary": "Get indexing pipeline statistics", + "operationId": "getPipeline", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PipelineStatsResponse" + } + } + } + } + } + } + }, + "/admin/opensearch/performance": { + "get": { + "tags": [ + "OpenSearch Admin" + ], + "summary": "Get OpenSearch performance metrics", + "operationId": "getPerformance", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PerformanceResponse" + } + } + } + } + } + } + }, + "/admin/opensearch/indices": { + "get": { + "tags": [ + "OpenSearch Admin" + ], + "summary": "Get OpenSearch indices with pagination", + "operationId": "getIndices", + "parameters": [ + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/IndicesPageResponse" + } + } + } + } + } + } + }, + "/admin/database/tables": { + "get": { + "tags": [ + "Database Admin" + ], + "summary": "Get table sizes and row counts", + "operationId": "getTables", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TableSizeResponse" + } + } + } + } + } + } + } + }, + "/admin/database/status": { + "get": { + "tags": [ + "Database Admin" + ], + "summary": "Get database connection status and version", + "operationId": "getStatus_1", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/DatabaseStatusResponse" + } + } + } + } + } + } + }, + "/admin/database/queries": { + "get": { + "tags": [ + "Database Admin" + ], + "summary": "Get active queries", + "operationId": "getQueries", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActiveQueryResponse" + } + } + } + } + } + } + } + }, + "/admin/database/pool": { + "get": { + "tags": [ + "Database Admin" + ], + "summary": "Get HikariCP connection pool stats", + "operationId": "getPool", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ConnectionPoolResponse" + } + } + } + } + } + } + }, + "/admin/audit": { + "get": { + "tags": [ + "Audit Log" + ], + "summary": "Search audit log entries with pagination", + "operationId": "getAuditLog", + "parameters": [ + { + "name": "username", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "from", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date" + } + }, + { + "name": "to", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "timestamp" + } + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 25 + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/AuditLogPageResponse" + } + } + } + } + } + } + }, + "/admin/opensearch/indices/{name}": { + "delete": { + "tags": [ + "OpenSearch Admin" + ], + "summary": "Delete an OpenSearch index", + "operationId": "deleteIndex", + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + } + } + } } }, "components": { @@ -1473,6 +1902,173 @@ } } }, + "DatabaseThresholdsRequest": { + "type": "object", + "description": "Database monitoring thresholds", + "properties": { + "connectionPoolWarning": { + "type": "integer", + "format": "int32", + "description": "Connection pool usage warning threshold (percentage)", + "maximum": 100, + "minimum": 0 + }, + "connectionPoolCritical": { + "type": "integer", + "format": "int32", + "description": "Connection pool usage critical threshold (percentage)", + "maximum": 100, + "minimum": 0 + }, + "queryDurationWarning": { + "type": "number", + "format": "double", + "description": "Query duration warning threshold (seconds)" + }, + "queryDurationCritical": { + "type": "number", + "format": "double", + "description": "Query duration critical threshold (seconds)" + } + } + }, + "OpenSearchThresholdsRequest": { + "type": "object", + "description": "OpenSearch monitoring thresholds", + "properties": { + "clusterHealthWarning": { + "type": "string", + "description": "Cluster health warning threshold (GREEN, YELLOW, RED)", + "minLength": 1 + }, + "clusterHealthCritical": { + "type": "string", + "description": "Cluster health critical threshold (GREEN, YELLOW, RED)", + "minLength": 1 + }, + "queueDepthWarning": { + "type": "integer", + "format": "int32", + "description": "Queue depth warning threshold", + "minimum": 0 + }, + "queueDepthCritical": { + "type": "integer", + "format": "int32", + "description": "Queue depth critical threshold", + "minimum": 0 + }, + "jvmHeapWarning": { + "type": "integer", + "format": "int32", + "description": "JVM heap usage warning threshold (percentage)", + "maximum": 100, + "minimum": 0 + }, + "jvmHeapCritical": { + "type": "integer", + "format": "int32", + "description": "JVM heap usage critical threshold (percentage)", + "maximum": 100, + "minimum": 0 + }, + "failedDocsWarning": { + "type": "integer", + "format": "int32", + "description": "Failed document count warning threshold", + "minimum": 0 + }, + "failedDocsCritical": { + "type": "integer", + "format": "int32", + "description": "Failed document count critical threshold", + "minimum": 0 + } + } + }, + "ThresholdConfigRequest": { + "type": "object", + "description": "Threshold configuration for admin monitoring", + "properties": { + "database": { + "$ref": "#/components/schemas/DatabaseThresholdsRequest" + }, + "opensearch": { + "$ref": "#/components/schemas/OpenSearchThresholdsRequest" + } + }, + "required": [ + "database", + "opensearch" + ] + }, + "DatabaseThresholds": { + "type": "object", + "properties": { + "connectionPoolWarning": { + "type": "integer", + "format": "int32" + }, + "connectionPoolCritical": { + "type": "integer", + "format": "int32" + }, + "queryDurationWarning": { + "type": "number", + "format": "double" + }, + "queryDurationCritical": { + "type": "number", + "format": "double" + } + } + }, + "OpenSearchThresholds": { + "type": "object", + "properties": { + "clusterHealthWarning": { + "type": "string" + }, + "clusterHealthCritical": { + "type": "string" + }, + "queueDepthWarning": { + "type": "integer", + "format": "int32" + }, + "queueDepthCritical": { + "type": "integer", + "format": "int32" + }, + "jvmHeapWarning": { + "type": "integer", + "format": "int32" + }, + "jvmHeapCritical": { + "type": "integer", + "format": "int32" + }, + "failedDocsWarning": { + "type": "integer", + "format": "int32" + }, + "failedDocsCritical": { + "type": "integer", + "format": "int32" + } + } + }, + "ThresholdConfig": { + "type": "object", + "properties": { + "database": { + "$ref": "#/components/schemas/DatabaseThresholds" + }, + "opensearch": { + "$ref": "#/components/schemas/OpenSearchThresholds" + } + } + }, "OidcAdminConfigRequest": { "type": "object", "description": "OIDC configuration update request", @@ -1732,8 +2328,8 @@ }, "required": [ "accessToken", - "refreshToken", - "displayName" + "displayName", + "refreshToken" ] }, "CallbackRequest": { @@ -2336,6 +2932,387 @@ "roles", "userId" ] + }, + "OpenSearchStatusResponse": { + "type": "object", + "description": "OpenSearch cluster status", + "properties": { + "reachable": { + "type": "boolean", + "description": "Whether the cluster is reachable" + }, + "clusterHealth": { + "type": "string", + "description": "Cluster health status (GREEN, YELLOW, RED)" + }, + "version": { + "type": "string", + "description": "OpenSearch version" + }, + "nodeCount": { + "type": "integer", + "format": "int32", + "description": "Number of nodes in the cluster" + }, + "host": { + "type": "string", + "description": "OpenSearch host" + } + } + }, + "PipelineStatsResponse": { + "type": "object", + "description": "Search indexing pipeline statistics", + "properties": { + "queueDepth": { + "type": "integer", + "format": "int32", + "description": "Current queue depth" + }, + "maxQueueSize": { + "type": "integer", + "format": "int32", + "description": "Maximum queue size" + }, + "failedCount": { + "type": "integer", + "format": "int64", + "description": "Number of failed indexing operations" + }, + "indexedCount": { + "type": "integer", + "format": "int64", + "description": "Number of successfully indexed documents" + }, + "debounceMs": { + "type": "integer", + "format": "int64", + "description": "Debounce interval in milliseconds" + }, + "indexingRate": { + "type": "number", + "format": "double", + "description": "Current indexing rate (docs/sec)" + }, + "lastIndexedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp of last indexed document" + } + } + }, + "PerformanceResponse": { + "type": "object", + "description": "OpenSearch performance metrics", + "properties": { + "queryCacheHitRate": { + "type": "number", + "format": "double", + "description": "Query cache hit rate (0.0-1.0)" + }, + "requestCacheHitRate": { + "type": "number", + "format": "double", + "description": "Request cache hit rate (0.0-1.0)" + }, + "searchLatencyMs": { + "type": "number", + "format": "double", + "description": "Average search latency in milliseconds" + }, + "indexingLatencyMs": { + "type": "number", + "format": "double", + "description": "Average indexing latency in milliseconds" + }, + "jvmHeapUsedBytes": { + "type": "integer", + "format": "int64", + "description": "JVM heap used in bytes" + }, + "jvmHeapMaxBytes": { + "type": "integer", + "format": "int64", + "description": "JVM heap max in bytes" + } + } + }, + "IndexInfoResponse": { + "type": "object", + "description": "OpenSearch index information", + "properties": { + "name": { + "type": "string", + "description": "Index name" + }, + "docCount": { + "type": "integer", + "format": "int64", + "description": "Document count" + }, + "size": { + "type": "string", + "description": "Human-readable index size" + }, + "sizeBytes": { + "type": "integer", + "format": "int64", + "description": "Index size in bytes" + }, + "health": { + "type": "string", + "description": "Index health status" + }, + "primaryShards": { + "type": "integer", + "format": "int32", + "description": "Number of primary shards" + }, + "replicaShards": { + "type": "integer", + "format": "int32", + "description": "Number of replica shards" + } + } + }, + "IndicesPageResponse": { + "type": "object", + "description": "Paginated list of OpenSearch indices", + "properties": { + "indices": { + "type": "array", + "description": "Index list for current page", + "items": { + "$ref": "#/components/schemas/IndexInfoResponse" + } + }, + "totalIndices": { + "type": "integer", + "format": "int64", + "description": "Total number of indices" + }, + "totalDocs": { + "type": "integer", + "format": "int64", + "description": "Total document count across all indices" + }, + "totalSize": { + "type": "string", + "description": "Human-readable total size" + }, + "page": { + "type": "integer", + "format": "int32", + "description": "Current page number (0-based)" + }, + "pageSize": { + "type": "integer", + "format": "int32", + "description": "Page size" + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages" + } + } + }, + "TableSizeResponse": { + "type": "object", + "description": "Table size and row count information", + "properties": { + "tableName": { + "type": "string", + "description": "Table name" + }, + "rowCount": { + "type": "integer", + "format": "int64", + "description": "Approximate row count" + }, + "dataSize": { + "type": "string", + "description": "Human-readable data size" + }, + "indexSize": { + "type": "string", + "description": "Human-readable index size" + }, + "dataSizeBytes": { + "type": "integer", + "format": "int64", + "description": "Data size in bytes" + }, + "indexSizeBytes": { + "type": "integer", + "format": "int64", + "description": "Index size in bytes" + } + } + }, + "DatabaseStatusResponse": { + "type": "object", + "description": "Database connection and version status", + "properties": { + "connected": { + "type": "boolean", + "description": "Whether the database is reachable" + }, + "version": { + "type": "string", + "description": "PostgreSQL version string" + }, + "host": { + "type": "string", + "description": "Database host" + }, + "schema": { + "type": "string", + "description": "Current schema search path" + }, + "timescaleDb": { + "type": "boolean", + "description": "Whether TimescaleDB extension is available" + } + } + }, + "ActiveQueryResponse": { + "type": "object", + "description": "Currently running database query", + "properties": { + "pid": { + "type": "integer", + "format": "int32", + "description": "Backend process ID" + }, + "durationSeconds": { + "type": "number", + "format": "double", + "description": "Query duration in seconds" + }, + "state": { + "type": "string", + "description": "Backend state (active, idle, etc.)" + }, + "query": { + "type": "string", + "description": "SQL query text" + } + } + }, + "ConnectionPoolResponse": { + "type": "object", + "description": "HikariCP connection pool statistics", + "properties": { + "activeConnections": { + "type": "integer", + "format": "int32", + "description": "Number of currently active connections" + }, + "idleConnections": { + "type": "integer", + "format": "int32", + "description": "Number of idle connections" + }, + "pendingThreads": { + "type": "integer", + "format": "int32", + "description": "Number of threads waiting for a connection" + }, + "maxWaitMs": { + "type": "integer", + "format": "int64", + "description": "Maximum wait time in milliseconds" + }, + "maxPoolSize": { + "type": "integer", + "format": "int32", + "description": "Maximum pool size" + } + } + }, + "AuditLogPageResponse": { + "type": "object", + "description": "Paginated audit log entries", + "properties": { + "items": { + "type": "array", + "description": "Audit log entries", + "items": { + "$ref": "#/components/schemas/AuditRecord" + } + }, + "totalCount": { + "type": "integer", + "format": "int64", + "description": "Total number of matching entries" + }, + "page": { + "type": "integer", + "format": "int32", + "description": "Current page number (0-based)" + }, + "pageSize": { + "type": "integer", + "format": "int32", + "description": "Page size" + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages" + } + } + }, + "AuditRecord": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "username": { + "type": "string" + }, + "action": { + "type": "string" + }, + "category": { + "type": "string", + "enum": [ + "INFRA", + "AUTH", + "USER_MGMT", + "CONFIG" + ] + }, + "target": { + "type": "string" + }, + "detail": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "result": { + "type": "string", + "enum": [ + "SUCCESS", + "FAILURE" + ] + }, + "ipAddress": { + "type": "string" + }, + "userAgent": { + "type": "string" + } + } } }, "securitySchemes": { diff --git a/ui/src/api/schema.d.ts b/ui/src/api/schema.d.ts index 8c48a1b4..69715ba9 100644 --- a/ui/src/api/schema.d.ts +++ b/ui/src/api/schema.d.ts @@ -21,6 +21,24 @@ export interface paths { patch?: never; trace?: never; }; + "/admin/thresholds": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get current threshold configuration */ + get: operations["getThresholds"]; + /** Update threshold configuration */ + put: operations["updateThresholds"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/admin/oidc": { parameters: { query?: never; @@ -326,6 +344,23 @@ export interface paths { patch?: never; trace?: never; }; + "/admin/database/queries/{pid}/kill": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Terminate a query by PID */ + post: operations["killQuery"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/search/stats": { parameters: { query?: never; @@ -526,6 +561,176 @@ export interface paths { patch?: never; trace?: never; }; + "/admin/opensearch/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get OpenSearch cluster status and version */ + get: operations["getStatus"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/opensearch/pipeline": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get indexing pipeline statistics */ + get: operations["getPipeline"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/opensearch/performance": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get OpenSearch performance metrics */ + get: operations["getPerformance"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/opensearch/indices": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get OpenSearch indices with pagination */ + get: operations["getIndices"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/database/tables": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get table sizes and row counts */ + get: operations["getTables"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/database/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get database connection status and version */ + get: operations["getStatus_1"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/database/queries": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get active queries */ + get: operations["getQueries"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/database/pool": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get HikariCP connection pool stats */ + get: operations["getPool"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/audit": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Search audit log entries with pagination */ + get: operations["getAuditLog"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/admin/opensearch/indices/{name}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Delete an OpenSearch index */ + delete: operations["deleteIndex"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { @@ -533,6 +738,101 @@ export interface components { RolesRequest: { roles?: string[]; }; + /** @description Database monitoring thresholds */ + DatabaseThresholdsRequest: { + /** + * Format: int32 + * @description Connection pool usage warning threshold (percentage) + */ + connectionPoolWarning?: number; + /** + * Format: int32 + * @description Connection pool usage critical threshold (percentage) + */ + connectionPoolCritical?: number; + /** + * Format: double + * @description Query duration warning threshold (seconds) + */ + queryDurationWarning?: number; + /** + * Format: double + * @description Query duration critical threshold (seconds) + */ + queryDurationCritical?: number; + }; + /** @description OpenSearch monitoring thresholds */ + OpenSearchThresholdsRequest: { + /** @description Cluster health warning threshold (GREEN, YELLOW, RED) */ + clusterHealthWarning?: string; + /** @description Cluster health critical threshold (GREEN, YELLOW, RED) */ + clusterHealthCritical?: string; + /** + * Format: int32 + * @description Queue depth warning threshold + */ + queueDepthWarning?: number; + /** + * Format: int32 + * @description Queue depth critical threshold + */ + queueDepthCritical?: number; + /** + * Format: int32 + * @description JVM heap usage warning threshold (percentage) + */ + jvmHeapWarning?: number; + /** + * Format: int32 + * @description JVM heap usage critical threshold (percentage) + */ + jvmHeapCritical?: number; + /** + * Format: int32 + * @description Failed document count warning threshold + */ + failedDocsWarning?: number; + /** + * Format: int32 + * @description Failed document count critical threshold + */ + failedDocsCritical?: number; + }; + /** @description Threshold configuration for admin monitoring */ + ThresholdConfigRequest: { + database: components["schemas"]["DatabaseThresholdsRequest"]; + opensearch: components["schemas"]["OpenSearchThresholdsRequest"]; + }; + DatabaseThresholds: { + /** Format: int32 */ + connectionPoolWarning?: number; + /** Format: int32 */ + connectionPoolCritical?: number; + /** Format: double */ + queryDurationWarning?: number; + /** Format: double */ + queryDurationCritical?: number; + }; + OpenSearchThresholds: { + clusterHealthWarning?: string; + clusterHealthCritical?: string; + /** Format: int32 */ + queueDepthWarning?: number; + /** Format: int32 */ + queueDepthCritical?: number; + /** Format: int32 */ + jvmHeapWarning?: number; + /** Format: int32 */ + jvmHeapCritical?: number; + /** Format: int32 */ + failedDocsWarning?: number; + /** Format: int32 */ + failedDocsCritical?: number; + }; + ThresholdConfig: { + database?: components["schemas"]["DatabaseThresholds"]; + opensearch?: components["schemas"]["OpenSearchThresholds"]; + }; /** @description OIDC configuration update request */ OidcAdminConfigRequest: { enabled?: boolean; @@ -816,6 +1116,279 @@ export interface components { /** Format: date-time */ createdAt: string; }; + /** @description OpenSearch cluster status */ + OpenSearchStatusResponse: { + /** @description Whether the cluster is reachable */ + reachable?: boolean; + /** @description Cluster health status (GREEN, YELLOW, RED) */ + clusterHealth?: string; + /** @description OpenSearch version */ + version?: string; + /** + * Format: int32 + * @description Number of nodes in the cluster + */ + nodeCount?: number; + /** @description OpenSearch host */ + host?: string; + }; + /** @description Search indexing pipeline statistics */ + PipelineStatsResponse: { + /** + * Format: int32 + * @description Current queue depth + */ + queueDepth?: number; + /** + * Format: int32 + * @description Maximum queue size + */ + maxQueueSize?: number; + /** + * Format: int64 + * @description Number of failed indexing operations + */ + failedCount?: number; + /** + * Format: int64 + * @description Number of successfully indexed documents + */ + indexedCount?: number; + /** + * Format: int64 + * @description Debounce interval in milliseconds + */ + debounceMs?: number; + /** + * Format: double + * @description Current indexing rate (docs/sec) + */ + indexingRate?: number; + /** + * Format: date-time + * @description Timestamp of last indexed document + */ + lastIndexedAt?: string; + }; + /** @description OpenSearch performance metrics */ + PerformanceResponse: { + /** + * Format: double + * @description Query cache hit rate (0.0-1.0) + */ + queryCacheHitRate?: number; + /** + * Format: double + * @description Request cache hit rate (0.0-1.0) + */ + requestCacheHitRate?: number; + /** + * Format: double + * @description Average search latency in milliseconds + */ + searchLatencyMs?: number; + /** + * Format: double + * @description Average indexing latency in milliseconds + */ + indexingLatencyMs?: number; + /** + * Format: int64 + * @description JVM heap used in bytes + */ + jvmHeapUsedBytes?: number; + /** + * Format: int64 + * @description JVM heap max in bytes + */ + jvmHeapMaxBytes?: number; + }; + /** @description OpenSearch index information */ + IndexInfoResponse: { + /** @description Index name */ + name?: string; + /** + * Format: int64 + * @description Document count + */ + docCount?: number; + /** @description Human-readable index size */ + size?: string; + /** + * Format: int64 + * @description Index size in bytes + */ + sizeBytes?: number; + /** @description Index health status */ + health?: string; + /** + * Format: int32 + * @description Number of primary shards + */ + primaryShards?: number; + /** + * Format: int32 + * @description Number of replica shards + */ + replicaShards?: number; + }; + /** @description Paginated list of OpenSearch indices */ + IndicesPageResponse: { + /** @description Index list for current page */ + indices?: components["schemas"]["IndexInfoResponse"][]; + /** + * Format: int64 + * @description Total number of indices + */ + totalIndices?: number; + /** + * Format: int64 + * @description Total document count across all indices + */ + totalDocs?: number; + /** @description Human-readable total size */ + totalSize?: string; + /** + * Format: int32 + * @description Current page number (0-based) + */ + page?: number; + /** + * Format: int32 + * @description Page size + */ + pageSize?: number; + /** + * Format: int32 + * @description Total number of pages + */ + totalPages?: number; + }; + /** @description Table size and row count information */ + TableSizeResponse: { + /** @description Table name */ + tableName?: string; + /** + * Format: int64 + * @description Approximate row count + */ + rowCount?: number; + /** @description Human-readable data size */ + dataSize?: string; + /** @description Human-readable index size */ + indexSize?: string; + /** + * Format: int64 + * @description Data size in bytes + */ + dataSizeBytes?: number; + /** + * Format: int64 + * @description Index size in bytes + */ + indexSizeBytes?: number; + }; + /** @description Database connection and version status */ + DatabaseStatusResponse: { + /** @description Whether the database is reachable */ + connected?: boolean; + /** @description PostgreSQL version string */ + version?: string; + /** @description Database host */ + host?: string; + /** @description Current schema search path */ + schema?: string; + /** @description Whether TimescaleDB extension is available */ + timescaleDb?: boolean; + }; + /** @description Currently running database query */ + ActiveQueryResponse: { + /** + * Format: int32 + * @description Backend process ID + */ + pid?: number; + /** + * Format: double + * @description Query duration in seconds + */ + durationSeconds?: number; + /** @description Backend state (active, idle, etc.) */ + state?: string; + /** @description SQL query text */ + query?: string; + }; + /** @description HikariCP connection pool statistics */ + ConnectionPoolResponse: { + /** + * Format: int32 + * @description Number of currently active connections + */ + activeConnections?: number; + /** + * Format: int32 + * @description Number of idle connections + */ + idleConnections?: number; + /** + * Format: int32 + * @description Number of threads waiting for a connection + */ + pendingThreads?: number; + /** + * Format: int64 + * @description Maximum wait time in milliseconds + */ + maxWaitMs?: number; + /** + * Format: int32 + * @description Maximum pool size + */ + maxPoolSize?: number; + }; + /** @description Paginated audit log entries */ + AuditLogPageResponse: { + /** @description Audit log entries */ + items?: components["schemas"]["AuditRecord"][]; + /** + * Format: int64 + * @description Total number of matching entries + */ + totalCount?: number; + /** + * Format: int32 + * @description Current page number (0-based) + */ + page?: number; + /** + * Format: int32 + * @description Page size + */ + pageSize?: number; + /** + * Format: int32 + * @description Total number of pages + */ + totalPages?: number; + }; + AuditRecord: { + /** Format: int64 */ + id?: number; + /** Format: date-time */ + timestamp?: string; + username?: string; + action?: string; + /** @enum {string} */ + category?: "INFRA" | "AUTH" | "USER_MGMT" | "CONFIG"; + target?: string; + detail?: { + [key: string]: Record; + }; + /** @enum {string} */ + result?: "SUCCESS" | "FAILURE"; + ipAddress?: string; + userAgent?: string; + }; }; responses: never; parameters: never; @@ -856,6 +1429,50 @@ export interface operations { }; }; }; + getThresholds: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["ThresholdConfig"]; + }; + }; + }; + }; + updateThresholds: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ThresholdConfigRequest"]; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["ThresholdConfig"]; + }; + }; + }; + }; getConfig: { parameters: { query?: never; @@ -1034,13 +1651,6 @@ export interface operations { }; content?: never; }; - /** @description Buffer full, retry later */ - 503: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; }; }; ingestDiagrams: { @@ -1063,13 +1673,6 @@ export interface operations { }; content?: never; }; - /** @description Buffer full, retry later */ - 503: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; }; }; refresh: { @@ -1471,6 +2074,26 @@ export interface operations { }; }; }; + killQuery: { + parameters: { + query?: never; + header?: never; + path: { + pid: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; stats: { parameters: { query: { @@ -1615,7 +2238,9 @@ export interface operations { headers: { [name: string]: unknown; }; - content?: never; + content: { + "*/*": components["schemas"]["DiagramLayout"]; + }; }; }; }; @@ -1826,4 +2451,218 @@ export interface operations { }; }; }; + getStatus: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["OpenSearchStatusResponse"]; + }; + }; + }; + }; + getPipeline: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["PipelineStatsResponse"]; + }; + }; + }; + }; + getPerformance: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["PerformanceResponse"]; + }; + }; + }; + }; + getIndices: { + parameters: { + query?: { + page?: number; + size?: number; + search?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["IndicesPageResponse"]; + }; + }; + }; + }; + getTables: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["TableSizeResponse"][]; + }; + }; + }; + }; + getStatus_1: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["DatabaseStatusResponse"]; + }; + }; + }; + }; + getQueries: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["ActiveQueryResponse"][]; + }; + }; + }; + }; + getPool: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["ConnectionPoolResponse"]; + }; + }; + }; + }; + getAuditLog: { + parameters: { + query?: { + username?: string; + category?: string; + search?: string; + from?: string; + to?: string; + sort?: string; + order?: string; + page?: number; + size?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "*/*": components["schemas"]["AuditLogPageResponse"]; + }; + }; + }; + }; + deleteIndex: { + parameters: { + query?: never; + header?: never; + path: { + name: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + }; + }; }