diff --git a/agent/src/agent/mcp_server.py b/agent/src/agent/mcp_server.py index e36fbc0..6bd2316 100644 --- a/agent/src/agent/mcp_server.py +++ b/agent/src/agent/mcp_server.py @@ -64,16 +64,21 @@ async def chat_with_agent( } ) - result = await agent_graph.ainvoke(Command( - update={ - "last_error": None, - "trino_error": None, - "escalated": None, - "escalation_reason": None, - "refinement_count": 0, - }, - resume=resume_value - ), config=config) + is_node_interrupt = False + if getattr(state_snapshot, "interrupts", None): + is_node_interrupt = True + elif getattr(state_snapshot, "tasks", None): + if any(getattr(task, "interrupts", None) for task in state_snapshot.tasks): + is_node_interrupt = True + + # Resume the graph execution depending on how it was interrupted + if is_node_interrupt: + # Interrupted by the `interrupt()` function inside a node + result = await agent_graph.ainvoke(Command(resume=resume_value), config=config) + else: + # Interrupted by an `interrupt_before` breakpoint + await agent_graph.aupdate_state(config, resume_value) + result = await agent_graph.ainvoke(None, config=config) else: if not query: return json.dumps({"error": "Query is required for new chat session."}) @@ -142,8 +147,16 @@ async def chat_with_agent( final_state = await agent_graph.aget_state(config) # Check if interrupted by `interrupt()` function - if final_state.interrupts: + interrupt_val = None + if getattr(final_state, "interrupts", None): interrupt_val = final_state.interrupts[-1].value + elif getattr(final_state, "tasks", None): + for task in final_state.tasks: + if getattr(task, "interrupts", None): + interrupt_val = task.interrupts[-1].value + break + + if interrupt_val is not None: return json.dumps( { "thread_id": thread_id, diff --git a/agent/src/agent/nodes/query_builder.py b/agent/src/agent/nodes/query_builder.py index 1e6884b..61a6816 100644 --- a/agent/src/agent/nodes/query_builder.py +++ b/agent/src/agent/nodes/query_builder.py @@ -7,6 +7,8 @@ from agent.config import settings from agent.langfuse_client import langfuse_client from langgraph.types import interrupt + + async def query_builder_node(state: AgentState, config: RunnableConfig | None = None): """Build SQL from plan and pause for user approval.""" runtime_flags = state.get("runtime_flags") or {} diff --git a/agent/src/agent/nodes/refiner.py b/agent/src/agent/nodes/refiner.py index 8fc1beb..324e467 100644 --- a/agent/src/agent/nodes/refiner.py +++ b/agent/src/agent/nodes/refiner.py @@ -106,6 +106,7 @@ async def refiner_node(state: AgentState, config: RunnableConfig | None = None): "error": trino_error, "schema_context": schema_context, "error_history": json.dumps(error_history), + "user_query": state.get("user_query", ""), } ) new_sql = clean_sql(response.content) @@ -140,8 +141,8 @@ async def refiner_node(state: AgentState, config: RunnableConfig | None = None): langfuse_client.update_current_span( level="ERROR", status_message=f"ESCA write failed: {e}" ) - else: - logging.error(f"ESCA write failed: {e}") + + logging.error(f"ESCA write failed: {e}") raise RuntimeError(f"Failed to write query result to ESCA: {e}") return { diff --git a/agent/src/agent/nodes/satisfaction_check.py b/agent/src/agent/nodes/satisfaction_check.py index 9f1b728..fd5770b 100644 --- a/agent/src/agent/nodes/satisfaction_check.py +++ b/agent/src/agent/nodes/satisfaction_check.py @@ -62,7 +62,8 @@ async def satisfaction_check_node(state: AgentState, config: RunnableConfig | No failures.append(f"[CHECK_A] Execution failed: {state['trino_error']}") # ── Check B: Row Plausibility ───────────────────────────────────────────── - if _f(runtime_flags, "SATISFACTION_CHECK_PLAUSIBILITY", settings.SATISFACTION_CHECK_PLAUSIBILITY): + # Only run plausibility if there wasn't a hard execution failure + if not state.get("trino_error") and _f(runtime_flags, "SATISFACTION_CHECK_PLAUSIBILITY", settings.SATISFACTION_CHECK_PLAUSIBILITY): n = len(rows) min_rows = _f(runtime_flags, "SATISFACTION_MIN_ROWS", settings.SATISFACTION_MIN_ROWS) max_rows = _f(runtime_flags, "SATISFACTION_MAX_ROWS", settings.SATISFACTION_MAX_ROWS) diff --git a/agent/src/agent/nodes/schema_explorer.py b/agent/src/agent/nodes/schema_explorer.py index ca1dab3..80bb741 100644 --- a/agent/src/agent/nodes/schema_explorer.py +++ b/agent/src/agent/nodes/schema_explorer.py @@ -135,9 +135,22 @@ def _build_column_context(cp: "ColumnProfile") -> dict: return col +class TableJoin(BaseModel): + source_table: str = Field(description="Fully qualified name of the source table (catalog.schema.name)") + target_table: str = Field(description="Fully qualified name of the target table (catalog.schema.name)") + join_condition: str = Field(description="SQL condition for the join (e.g., A.id = B.a_id)") + +class SchemaPlan(BaseModel): + tables: List[str] = Field(description="List of fully qualified table names (catalog.schema.name) required for the query") + columns: List[str] = Field(description="Columns to select") + joins: List[TableJoin] = Field(default_factory=list, description="How to join the tables") + filters: List[str] = Field(default_factory=list, description="Any WHERE clause filters") + # Define standardized Schema Explorer Output Type class SchemaExplorerOutput(BaseModel): - schema_plan: Optional[Any] = Field( + reasoning: str = Field(default_factory=str, description="Reasoning for the schema plan - explain your logic.") + + schema_plan: Optional[SchemaPlan] = Field( default=None, description="Detailed query plan describing tables, columns, and joins.", ) @@ -156,6 +169,10 @@ class SchemaExplorerOutput(BaseModel): default_factory=list, description="List of fully qualified table names (catalog.schema.name) used in the plan.", ) + error: Optional[str] = Field( + default_factory=str, + description="Error message if any" + ) def get_query_embedding(text: str) -> list[float]: @@ -189,7 +206,7 @@ def hybrid_search_tables( all_tables = session.exec(stmt_all).all() allowed = allowed_tables or [] - statuses = allowed_statuses or ["production"] + statuses = allowed_statuses if allowed_statuses is not None else ["production"] allowed_tables_set = [] allowed_ids = set() @@ -430,7 +447,7 @@ def _parse_bool_flag(value) -> bool: sem = asyncio.Semaphore(profile_fetch_concurrency) - async def fetch_profile(t_id, t_name): + async def fetch_profile(t_id, t_name, t_fqn): nonlocal cache_hit_count, cache_miss_count async with sem: try: @@ -453,22 +470,25 @@ async def fetch_profile(t_id, t_name): cache_miss_count += 1 profile_res = await get_table_profile.ainvoke({"table_id": t_id}) - return json.loads(profile_res) + data = json.loads(profile_res) + data["fully_qualified_name"] = t_fqn + return data except Exception as e: print(f"Error fetching profile for {t_name}: {e}") return None fetch_tasks = [] for i, t in enumerate(candidate_tables): + fqn = f"{t.catalog}.{t.schema_name}.{t.name}" tables_info.append( { "id": t.id, - "name": f"{t.catalog}.{t.schema_name}.{t.name}", + "name": fqn, "description": "", } ) if i < max_profiles_to_fetch: - fetch_tasks.append(fetch_profile(t.id, t.name)) + fetch_tasks.append(fetch_profile(t.id, t.name, fqn)) if fetch_tasks: results = await asyncio.gather(*fetch_tasks, return_exceptions=True) @@ -532,7 +552,7 @@ async def fetch_profile(t_id, t_name): if schema_summarization and profile_details: try: summaries = [ - f"[{p.get('table_name', 'unknown')}] {p.get('description', '') or '(no description available)'}" + f"[{p.get('fully_qualified_name', p.get('table_name', 'unknown'))}] {p.get('description', '') or '(no description available)'}" for p in profile_details ] profiles_json_str = "\n".join(summaries) @@ -599,7 +619,7 @@ async def fetch_profile(t_id, t_name): plan = data.schema_plan if plan is not None and not isinstance(plan, str): - plan = json.dumps(plan) + plan = plan.model_dump_json() if hasattr(plan, "model_dump_json") else json.dumps(plan) elif plan is None: plan = "" diff --git a/backend/alembic/versions/70e8a34ff877_add_unique_constraint_to_tables.py b/backend/alembic/versions/70e8a34ff877_add_unique_constraint_to_tables.py new file mode 100644 index 0000000..f2ffa36 --- /dev/null +++ b/backend/alembic/versions/70e8a34ff877_add_unique_constraint_to_tables.py @@ -0,0 +1,39 @@ +"""Add unique constraint to tables + +Revision ID: 70e8a34ff877 +Revises: f9a3d1c8e205 +Create Date: 2026-07-07 11:17:43.459879 + +""" +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa +import sqlmodel + + +# revision identifiers, used by Alembic. +revision: str = '70e8a34ff877' +down_revision: Union[str, None] = 'f9a3d1c8e205' +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_constraint('uq_table_profiles_table_id', 'table_profiles', type_='unique') + op.drop_index('ix_table_profiles_table_id', table_name='table_profiles') + op.create_index(op.f('ix_table_profiles_table_id'), 'table_profiles', ['table_id'], unique=True) + op.drop_column('table_profiles', 'is_partial') + op.create_unique_constraint('uq_table_fqn', 'tables', ['catalog', 'schema_name', 'name']) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_constraint('uq_table_fqn', 'tables', type_='unique') + op.add_column('table_profiles', sa.Column('is_partial', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False)) + op.drop_index(op.f('ix_table_profiles_table_id'), table_name='table_profiles') + op.create_index('ix_table_profiles_table_id', 'table_profiles', ['table_id'], unique=False) + op.create_unique_constraint('uq_table_profiles_table_id', 'table_profiles', ['table_id'], postgresql_nulls_not_distinct=False) + # ### end Alembic commands ### diff --git a/backend/app/config.py b/backend/app/config.py index 22c58f9..52257d8 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -20,6 +20,7 @@ class Settings(BaseSettings): LANGFUSE_PUBLIC_KEY: str = "" LANGFUSE_SECRET_KEY: str = "" LANGFUSE_HOST: str = "https://cloud.langfuse.com" + LANGFUSE_REQUEST_TIMEOUT: float = 30.0 CORS_ORIGINS: list[str] = [ "http://localhost:5173", "http://localhost:3000", diff --git a/backend/app/routers/agent.py b/backend/app/routers/agent.py index 6f133a7..892d4a5 100644 --- a/backend/app/routers/agent.py +++ b/backend/app/routers/agent.py @@ -67,6 +67,17 @@ class ChatResponse(BaseModel): trace_id: str | None = None execution_path: list[str] | None = None +class TraceSpan(BaseModel): + span_name: str + start_time: str | None = None + duration_ms: int = 0 + input_tokens: int = 0 + output_tokens: int = 0 + model: str = "N/A" + status: str + input_preview: str = "" + output_preview: str = "" + # --------------------------------------------------------------------------- # Helpers @@ -187,6 +198,8 @@ async def chat(request: ChatRequest) -> ChatResponse: "allowed_tables": request.allowed_tables, "allowed_statuses": request.allowed_statuses, "extractors": request.extractors, + "active_skills": request.active_skills, + "execution_mode": request.execution_mode, "hitl_enabled": request.hitl_enabled, } @@ -254,13 +267,13 @@ async def event_generator(): return StreamingResponse(event_generator(), media_type="text/event-stream") -@router.get("/traces/{trace_id}") +@router.get("/traces/{trace_id}", response_model=list[TraceSpan]) async def get_trace_timeline(trace_id: str): """Fetch trace from Langfuse and normalize observations for frontend timeline.""" auth = (settings.LANGFUSE_PUBLIC_KEY, settings.LANGFUSE_SECRET_KEY) url = f"{settings.LANGFUSE_HOST}/api/public/traces/{trace_id}" - async with httpx.AsyncClient() as client: + async with httpx.AsyncClient(timeout=settings.LANGFUSE_REQUEST_TIMEOUT) as client: resp = await client.get(url, auth=auth) if resp.status_code != 200: if resp.status_code == 404: diff --git a/backend/app/routers/tables.py b/backend/app/routers/tables.py index c8797e7..196d126 100644 --- a/backend/app/routers/tables.py +++ b/backend/app/routers/tables.py @@ -195,6 +195,20 @@ def create_table(payload: TableCreate, session: Session = Depends(get_session)): text_to_embed = f"Table name: {name}\nSchema: {schema_name}\nDescription: {description}\nColumns: {', '.join([c.get('name', '') for c in om_columns])}" embedding = get_embedding(text_to_embed) + # Check for duplicate table + existing = session.exec( + select(Table).where( + Table.catalog == catalog_name, + Table.schema_name == schema_name, + Table.name == name + ) + ).first() + if existing: + raise HTTPException( + status_code=409, + detail=f"Table '{catalog_name}.{schema_name}.{name}' already exists." + ) + # Create the table table = Table( name=name, diff --git a/core/src/core/models/models.py b/core/src/core/models/models.py index f82ccae..600cb51 100644 --- a/core/src/core/models/models.py +++ b/core/src/core/models/models.py @@ -3,7 +3,7 @@ from enum import StrEnum from typing import Any, Literal -from sqlalchemy import JSON, Column, ForeignKey +from sqlalchemy import JSON, Column, ForeignKey, UniqueConstraint from sqlmodel import Field, SQLModel, Relationship from pgvector.sqlalchemy import Vector @@ -26,6 +26,9 @@ class FeatureFlagType(StrEnum): class Table(SQLModel, table=True): __tablename__ = "tables" + __table_args__ = ( + UniqueConstraint("catalog", "schema_name", "name", name="uq_table_fqn"), + ) id: str = Field(default_factory=lambda: str(uuid.uuid4()), primary_key=True) name: str = Field(index=True) diff --git a/frontend/openapi.json b/frontend/openapi.json index 76bd4d9..5bbb340 100644 --- a/frontend/openapi.json +++ b/frontend/openapi.json @@ -1,2663 +1 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Text2SQL Studio API", - "description": "Data Intelligence module \u2014 Evaluation Orchestration & Monitoring", - "version": "2.0.0" - }, - "paths": { - "/tables": { - "get": { - "tags": ["tables"], - "summary": "List Tables", - "operationId": "list_tables_tables_get", - "parameters": [ - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "anyOf": [{ "$ref": "#/components/schemas/TableStatus" }, { "type": "null" }], - "title": "Status" - } - }, - { - "name": "owner_id", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Owner Id" } - }, - { - "name": "search", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Search" } - }, - { - "name": "x-scope-id", - "in": "header", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "X-Scope-Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/TableRead" }, - "title": "Response List Tables Tables Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - }, - "post": { - "tags": ["tables"], - "summary": "Create Table", - "operationId": "create_table_tables_post", - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableCreate" } } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}": { - "get": { - "tags": ["tables"], - "summary": "Get Table", - "operationId": "get_table_tables__table_id__get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/sync-schema": { - "post": { - "tags": ["tables"], - "summary": "Sync Table Schema", - "operationId": "sync_table_schema_tables__table_id__sync_schema_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/status": { - "patch": { - "tags": ["tables"], - "summary": "Update Table Status", - "description": "Update a table's status.", - "operationId": "update_table_status_tables__table_id__status_patch", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "status", - "in": "query", - "required": true, - "schema": { "$ref": "#/components/schemas/TableStatus" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/enrichment": { - "post": { - "tags": ["enrichment"], - "summary": "Create Enrichment", - "description": "Save a new enrichment version for a table.\n\nIf the table is currently in 'production' and the new enrichment\nchanges the table_description or schema fields, the table is\nautomatically moved to 'degraded'.\n\nThis forces a full re-evaluation cycle before the table can be\npromoted to production again.", - "operationId": "create_enrichment_tables__table_id__enrichment_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentCreate" } } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/enrichment/latest": { - "get": { - "tags": ["enrichment"], - "summary": "Get Latest Enrichment", - "operationId": "get_latest_enrichment_tables__table_id__enrichment_latest_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EnrichmentRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/questions": { - "get": { - "tags": ["golden-questions"], - "summary": "List Questions", - "operationId": "list_questions_tables__table_id__questions_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/GoldenQuestionRead" }, - "title": "Response List Questions Tables Table Id Questions Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - }, - "post": { - "tags": ["golden-questions"], - "summary": "Create Question", - "operationId": "create_question_tables__table_id__questions_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/GoldenQuestionCreate" } - } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/GoldenQuestionRead" } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/questions/upload": { - "post": { - "tags": ["golden-questions"], - "summary": "Upload Questions", - "operationId": "upload_questions_tables__table_id__questions_upload_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_upload_questions_tables__table_id__questions_upload_post" - } - } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/questions/{question_id}": { - "delete": { - "tags": ["golden-questions"], - "summary": "Delete Question", - "operationId": "delete_question_tables__table_id__questions__question_id__delete", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "question_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Question Id" } - } - ], - "responses": { - "204": { "description": "Successful Response" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/readiness": { - "get": { - "tags": ["evaluation"], - "summary": "Get Readiness", - "operationId": "get_readiness_eval_readiness_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - } - } - } - }, - "/tables/{table_id}/eval/run": { - "post": { - "tags": ["evaluation"], - "summary": "Trigger Eval", - "operationId": "trigger_eval_tables__table_id__eval_run_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/eval/runs": { - "get": { - "tags": ["evaluation"], - "summary": "List Runs", - "operationId": "list_runs_tables__table_id__eval_runs_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvalRunRead" }, - "title": "Response List Runs Tables Table Id Eval Runs Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/runs/all": { - "get": { - "tags": ["evaluation"], - "summary": "Get All Eval Runs", - "operationId": "get_all_eval_runs_eval_runs_all_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { "$ref": "#/components/schemas/EvalRunRead" }, - "type": "array", - "title": "Response Get All Eval Runs Eval Runs All Get" - } - } - } - } - } - } - }, - "/eval/batch/{promotion_run_id}": { - "get": { - "tags": ["evaluation"], - "summary": "Get Batch Runs", - "operationId": "get_batch_runs_eval_batch__promotion_run_id__get", - "parameters": [ - { - "name": "promotion_run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Promotion Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvalRunRead" }, - "title": "Response Get Batch Runs Eval Batch Promotion Run Id Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/{run_id}": { - "get": { - "tags": ["evaluation"], - "summary": "Get Run", - "operationId": "get_run_eval__run_id__get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/{run_id}/results": { - "get": { - "tags": ["evaluation"], - "summary": "Get Results", - "operationId": "get_results_eval__run_id__results_get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvalResultRead" }, - "title": "Response Get Results Eval Run Id Results Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/{run_id}/report": { - "get": { - "tags": ["evaluation"], - "summary": "Get Run Report", - "operationId": "get_run_report_eval__run_id__report_get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/eval/{run_id}/regression-diff": { - "get": { - "tags": ["evaluation"], - "summary": "Get Regression Diff", - "description": "For a promotion-regression run, return questions that passed the baseline\nbut failed in the regression \u2014 true regressions introduced by the new candidate table.", - "operationId": "get_regression_diff_eval__run_id__regression_diff_get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/run": { - "post": { - "tags": ["evaluation-orchestration"], - "summary": "Trigger Evaluation Run", - "description": "Trigger evaluation for one or more tables.", - "operationId": "trigger_evaluation_run_evaluations_run_post", - "parameters": [ - { - "name": "triggered_by", - "in": "query", - "required": false, - "schema": { "type": "string", "default": "user", "title": "Triggered By" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "type": "array", "items": { "type": "string" }, "title": "Table Ids" } - } - } - }, - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvalRunRead" }, - "title": "Response Trigger Evaluation Run Evaluations Run Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/runs": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "List Runs", - "operationId": "list_runs_evaluations_runs_get", - "parameters": [ - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "maximum": 200, "default": 50, "title": "Limit" } - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { "type": "integer", "default": 0, "title": "Offset" } - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Status" } - }, - { - "name": "table_id", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvalRunRead" }, - "title": "Response List Runs Evaluations Runs Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/runs/{run_id}": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "Get Run", - "operationId": "get_run_evaluations_runs__run_id__get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/EvalRunRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/runs/{run_id}/report": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "Get Run Report", - "description": "Full structured report \u2014 matches the evaluation_pipeline.md format.", - "operationId": "get_run_report_evaluations_runs__run_id__report_get", - "parameters": [ - { - "name": "run_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Run Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/schedules": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "List Schedules", - "operationId": "list_schedules_evaluations_schedules_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { "$ref": "#/components/schemas/EvaluationScheduleRead" }, - "type": "array", - "title": "Response List Schedules Evaluations Schedules Get" - } - } - } - } - } - }, - "post": { - "tags": ["evaluation-orchestration"], - "summary": "Create Schedule", - "operationId": "create_schedule_evaluations_schedules_post", - "requestBody": { - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/EvaluationScheduleCreate" } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/EvaluationScheduleRead" } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/schedules/{schedule_id}": { - "put": { - "tags": ["evaluation-orchestration"], - "summary": "Update Schedule", - "operationId": "update_schedule_evaluations_schedules__schedule_id__put", - "parameters": [ - { - "name": "schedule_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Schedule Id" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/EvaluationScheduleUpdate" } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/EvaluationScheduleRead" } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - }, - "delete": { - "tags": ["evaluation-orchestration"], - "summary": "Delete Schedule", - "operationId": "delete_schedule_evaluations_schedules__schedule_id__delete", - "parameters": [ - { - "name": "schedule_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Schedule Id" } - } - ], - "responses": { - "204": { "description": "Successful Response" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/analytics/trends": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "Get Trends", - "description": "Score and pass_rate over time. Returns one data point per completed run.", - "operationId": "get_trends_evaluations_analytics_trends_get", - "parameters": [ - { - "name": "days", - "in": "query", - "required": false, - "schema": { "type": "integer", "default": 30, "title": "Days" } - }, - { - "name": "table_id", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/analytics/tables": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "Get Table Analytics", - "description": "Per-table performance ranking.", - "operationId": "get_table_analytics_evaluations_analytics_tables_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - } - } - } - }, - "/evaluations/compare": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "Compare Runs", - "description": "Side-by-side comparison of two eval runs.", - "operationId": "compare_runs_evaluations_compare_get", - "parameters": [ - { - "name": "run1", - "in": "query", - "required": true, - "schema": { "type": "string", "title": "Run1" } - }, - { - "name": "run2", - "in": "query", - "required": true, - "schema": { "type": "string", "title": "Run2" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/alerts": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "List Alerts", - "operationId": "list_alerts_evaluations_alerts_get", - "parameters": [ - { - "name": "acknowledged", - "in": "query", - "required": false, - "schema": { - "anyOf": [{ "type": "boolean" }, { "type": "null" }], - "title": "Acknowledged" - } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "default": 50, "title": "Limit" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/EvaluationAlertRead" }, - "title": "Response List Alerts Evaluations Alerts Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/alerts/{alert_id}/acknowledge": { - "post": { - "tags": ["evaluation-orchestration"], - "summary": "Acknowledge Alert", - "operationId": "acknowledge_alert_evaluations_alerts__alert_id__acknowledge_post", - "parameters": [ - { - "name": "alert_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Alert Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/EvaluationAlertRead" } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/evaluations/system-health": { - "get": { - "tags": ["evaluation-orchestration"], - "summary": "System Health", - "description": "Aggregate system health for the control center dashboard.", - "operationId": "system_health_evaluations_system_health_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - } - } - } - }, - "/tables/{table_id}/publish": { - "post": { - "tags": ["publish"], - "summary": "Publish Table", - "operationId": "publish_table_tables__table_id__publish_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/scopes": { - "get": { - "tags": ["scopes"], - "summary": "List Scopes", - "operationId": "list_scopes_scopes_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { "$ref": "#/components/schemas/UserScopeRead" }, - "type": "array", - "title": "Response List Scopes Scopes Get" - } - } - } - } - } - }, - "post": { - "tags": ["scopes"], - "summary": "Create Scope", - "operationId": "create_scope_scopes_post", - "requestBody": { - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UserScopeCreate" } } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UserScopeRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/scopes/{scope_id}/activate": { - "post": { - "tags": ["scopes"], - "summary": "Activate Scope", - "operationId": "activate_scope_scopes__scope_id__activate_post", - "parameters": [ - { - "name": "scope_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Scope Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/UserScopeRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/audit/queries": { - "get": { - "tags": ["audit"], - "summary": "List Audit Queries", - "operationId": "list_audit_queries_audit_queries_get", - "parameters": [ - { - "name": "table_id", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" } - }, - { - "name": "user_id", - "in": "query", - "required": false, - "schema": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "User Id" } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "maximum": 200, "default": 50, "title": "Limit" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/AuditQueryRead" }, - "title": "Response List Audit Queries Audit Queries Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/profile": { - "get": { - "tags": ["profiling"], - "summary": "Get Table Profile", - "operationId": "get_table_profile_tables__table_id__profile_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableProfileRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/all/profile/run": { - "post": { - "tags": ["profiling"], - "summary": "Run All Profiles", - "description": "Triggers profiling for all registered tables. \nIdeal for Airflow DAGs to keep profiles up-to-date.", - "operationId": "run_all_profiles_tables_all_profile_run_post", - "parameters": [ - { - "name": "force", - "in": "query", - "required": false, - "schema": { "type": "boolean", "default": false, "title": "Force" } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/profile/run": { - "post": { - "tags": ["profiling"], - "summary": "Run Table Profile", - "description": "Trigger a new profiling run against Trino.\nReturns immediately (202) while profiling runs in the background.\nRespects a 24h cache unless force=True.", - "operationId": "run_table_profile_tables__table_id__profile_run_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "force", - "in": "query", - "required": false, - "schema": { "type": "boolean", "default": false, "title": "Force" } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableProfileRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/profile/columns": { - "get": { - "tags": ["profiling"], - "summary": "Get Column Profiles", - "operationId": "get_column_profiles_tables__table_id__profile_columns_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/ColumnProfileRead" }, - "title": "Response Get Column Profiles Tables Table Id Profile Columns Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/columns/{column}/profile": { - "get": { - "tags": ["profiling"], - "summary": "Get Single Column Profile", - "operationId": "get_single_column_profile_tables__table_id__columns__column__profile_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "column", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Column" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/ColumnProfileRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/profile/context": { - "get": { - "tags": ["profiling"], - "summary": "Get Profile Context", - "description": "Returns a compact, LLM-ready context blob built from the latest\ncompleted profile. Used by the TextToSQL context builder for\nsystem-prompt injection, enrichment suggestions, and join suggestions.", - "operationId": "get_profile_context_tables__table_id__profile_context_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "title": "Response Get Profile Context Tables Table Id Profile Context Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/cross-profile": { - "post": { - "tags": ["profiling"], - "summary": "Cross Profile", - "description": "Discover cross-table join suggestions based on profiling statistics.", - "operationId": "cross_profile_tables__table_id__cross_profile_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/CrossTableProfileRead" }, - "title": "Response Cross Profile Tables Table Id Cross Profile Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - }, - "get": { - "tags": ["profiling"], - "summary": "Get Cross Profiles", - "operationId": "get_cross_profiles_tables__table_id__cross_profile_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/CrossTableProfileRead" }, - "title": "Response Get Cross Profiles Tables Table Id Cross Profile Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/feedback": { - "post": { - "tags": ["feedback"], - "summary": "Submit Feedback", - "operationId": "submit_feedback_feedback_post", - "requestBody": { - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/QueryFeedbackCreate" } } - }, - "required": true - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/QueryFeedbackRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/feedback/table/{table_id}": { - "get": { - "tags": ["feedback"], - "summary": "Get Table Feedback", - "operationId": "get_table_feedback_feedback_table__table_id__get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "default": 50, "title": "Limit" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/QueryFeedbackRead" }, - "title": "Response Get Table Feedback Feedback Table Table Id Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/feedback/query/{query_id}": { - "get": { - "tags": ["feedback"], - "summary": "Get Query Feedback", - "operationId": "get_query_feedback_feedback_query__query_id__get", - "parameters": [ - { - "name": "query_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Query Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/QueryFeedbackRead" }, - "title": "Response Get Query Feedback Feedback Query Query Id Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/health": { - "get": { - "tags": ["health"], - "summary": "Get Table Health", - "operationId": "get_table_health_tables__table_id__health_get", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableHealthRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/tables/{table_id}/health/recompute": { - "post": { - "tags": ["health"], - "summary": "Recompute Health", - "operationId": "recompute_health_tables__table_id__health_recompute_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/TableHealthRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/health/all": { - "get": { - "tags": ["health"], - "summary": "Get All Health", - "description": "Returns the latest health record for every table (used in the table list view).", - "operationId": "get_all_health_health_all_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "items": { "$ref": "#/components/schemas/TableHealthRead" }, - "type": "array", - "title": "Response Get All Health Health All Get" - } - } - } - } - } - } - }, - "/admin/login": { - "post": { - "tags": ["admin_auth"], - "summary": "Login", - "description": "Validate that the supplied email belongs to an active admin in security.users.\nReturns the user record on success; raises 403 when the user is not an admin.", - "operationId": "login_admin_login_post", - "requestBody": { - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/SecurityUserRead" } } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/admin/tables/pending": { - "get": { - "tags": ["admin_approval"], - "summary": "Get Pending Tables", - "description": "Get all tables in 'verified' status (awaiting admin approval).", - "operationId": "get_pending_tables_admin_tables_pending_get", - "parameters": [ - { - "name": "X-Admin-Email", - "in": "header", - "required": true, - "schema": { "type": "string", "title": "X-Admin-Email" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { "type": "object" }, - "title": "Response Get Pending Tables Admin Tables Pending Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/admin/tables/{table_id}/approve": { - "post": { - "tags": ["admin_approval"], - "summary": "Approve Table", - "description": "Approve a verified table for production.\n\nActions:\n 1. Set table.status = production\n 2. Sync its golden questions to the shared 'text2sql_production' Langfuse dataset", - "operationId": "approve_table_admin_tables__table_id__approve_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "X-Admin-Email", - "in": "header", - "required": true, - "schema": { "type": "string", "title": "X-Admin-Email" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/admin/tables/{table_id}/reject": { - "post": { - "tags": ["admin_approval"], - "summary": "Reject Table", - "description": "Reject a verified table, returning it to sandbox.", - "operationId": "reject_table_admin_tables__table_id__reject_post", - "parameters": [ - { - "name": "table_id", - "in": "path", - "required": true, - "schema": { "type": "string", "title": "Table Id" } - }, - { - "name": "X-Admin-Email", - "in": "header", - "required": true, - "schema": { "type": "string", "title": "X-Admin-Email" } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/RejectionNote" } } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - }, - "/health": { - "get": { - "summary": "Health", - "operationId": "health_health_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { "application/json": { "schema": {} } } - } - } - } - } - }, - "components": { - "schemas": { - "AlertSeverity": { - "type": "string", - "enum": ["info", "warning", "critical"], - "title": "AlertSeverity" - }, - "AuditQueryRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" }, - "user_id": { "type": "string", "title": "User Id" }, - "session_id": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Session Id" - }, - "raw_question": { "type": "string", "title": "Raw Question" }, - "normalized_question": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Normalized Question" - }, - "tables_accessed": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Tables Accessed" - }, - "final_sql": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Final Sql" - }, - "result_row_count": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Result Row Count" - }, - "result_columns": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Result Columns" - }, - "execution_time_ms": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Execution Time Ms" - }, - "refiner_iterations": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Refiner Iterations" - }, - "status": { "type": "string", "title": "Status" }, - "error_message": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Error Message" - }, - "langfuse_trace_id": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Langfuse Trace Id" - }, - "confidence_score": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Confidence Score" - }, - "explanation_text": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Explanation Text" - }, - "warnings_json": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Warnings Json" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "user_id", - "session_id", - "raw_question", - "normalized_question", - "tables_accessed", - "final_sql", - "result_row_count", - "result_columns", - "execution_time_ms", - "refiner_iterations", - "status", - "error_message", - "langfuse_trace_id", - "confidence_score", - "explanation_text", - "warnings_json", - "created_at" - ], - "title": "AuditQueryRead" - }, - "Body_upload_questions_tables__table_id__questions_upload_post": { - "properties": { "file": { "type": "string", "format": "binary", "title": "File" } }, - "type": "object", - "required": ["file"], - "title": "Body_upload_questions_tables__table_id__questions_upload_post" - }, - "ColumnProfileRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "type": "string", "title": "Table Id" }, - "profile_id": { "type": "string", "title": "Profile Id" }, - "column_name": { "type": "string", "title": "Column Name" }, - "data_type": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Data Type" - }, - "null_count": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Null Count" - }, - "null_rate": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Null Rate" - }, - "distinct_count": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Distinct Count" - }, - "min_value": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Min Value" - }, - "max_value": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Max Value" - }, - "avg_value": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Avg Value" - }, - "median_value": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Median Value" - }, - "top_values": { "anyOf": [{}, { "type": "null" }], "title": "Top Values" }, - "is_categorical": { "type": "boolean", "title": "Is Categorical" }, - "is_geo": { "type": "boolean", "title": "Is Geo" }, - "is_time": { "type": "boolean", "title": "Is Time" }, - "semantic_type": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Semantic Type" - }, - "stats_json": { "anyOf": [{}, { "type": "null" }], "title": "Stats Json" }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "profile_id", - "column_name", - "data_type", - "null_count", - "null_rate", - "distinct_count", - "min_value", - "max_value", - "avg_value", - "median_value", - "top_values", - "is_categorical", - "is_geo", - "is_time", - "semantic_type", - "stats_json", - "created_at" - ], - "title": "ColumnProfileRead" - }, - "CrossTableProfileRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "source_table_id": { "type": "string", "title": "Source Table Id" }, - "target_table_id": { "type": "string", "title": "Target Table Id" }, - "join_suggestion": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Join Suggestion" - }, - "match_strength": { "type": "string", "title": "Match Strength" }, - "common_columns": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Common Columns" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "source_table_id", - "target_table_id", - "join_suggestion", - "match_strength", - "common_columns", - "created_at" - ], - "title": "CrossTableProfileRead" - }, - "DifficultyLevel": { - "type": "string", - "enum": ["simple", "medium", "complex"], - "title": "DifficultyLevel" - }, - "EnrichmentCreate": { - "properties": { "data": { "type": "object", "title": "Data" } }, - "type": "object", - "required": ["data"], - "title": "EnrichmentCreate" - }, - "EnrichmentRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "type": "string", "title": "Table Id" }, - "version": { "type": "integer", "title": "Version" }, - "data": { "anyOf": [{ "type": "object" }, { "type": "null" }], "title": "Data" }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": ["id", "table_id", "version", "data", "created_at"], - "title": "EnrichmentRead" - }, - "EvalResultRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "run_id": { "type": "string", "title": "Run Id" }, - "question_id": { "type": "string", "title": "Question Id" }, - "score": { "type": "number", "title": "Score" }, - "status": { "type": "string", "title": "Status" }, - "error_type": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Error Type" - } - }, - "type": "object", - "required": ["id", "run_id", "question_id", "score", "status", "error_type"], - "title": "EvalResultRead" - }, - "EvalRunRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" }, - "table_name": { "type": "string", "title": "Table Name" }, - "dataset_id": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Dataset Id" - }, - "score": { "type": "number", "title": "Score" }, - "pass_rate": { "type": "number", "title": "Pass Rate" }, - "fail_rate": { "type": "number", "title": "Fail Rate" }, - "total_questions": { "type": "integer", "title": "Total Questions" }, - "duration_seconds": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Duration Seconds" - }, - "triggered_by": { "type": "string", "title": "Triggered By" }, - "status": { "$ref": "#/components/schemas/EvalStatus" }, - "started_at": { "type": "string", "format": "date-time", "title": "Started At" }, - "completed_at": { - "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], - "title": "Completed At" - }, - "failure_breakdown": { - "anyOf": [{ "type": "object" }, { "type": "null" }], - "title": "Failure Breakdown" - }, - "dimension_averages": { - "anyOf": [{ "type": "object" }, { "type": "null" }], - "title": "Dimension Averages" - }, - "regression_detected": { "type": "boolean", "title": "Regression Detected" }, - "regression_delta": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Regression Delta" - }, - "promotion_run_id": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Promotion Run Id" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "table_name", - "dataset_id", - "score", - "pass_rate", - "fail_rate", - "total_questions", - "duration_seconds", - "triggered_by", - "status", - "started_at", - "completed_at", - "failure_breakdown", - "dimension_averages", - "regression_detected", - "regression_delta", - "created_at" - ], - "title": "EvalRunRead" - }, - "EvalStatus": { - "type": "string", - "enum": ["running", "completed", "failed"], - "title": "EvalStatus" - }, - "EvaluationAlertRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "run_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Run Id" }, - "table_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" }, - "alert_type": { "type": "string", "title": "Alert Type" }, - "severity": { "$ref": "#/components/schemas/AlertSeverity" }, - "message": { "type": "string", "title": "Message" }, - "details": { "anyOf": [{ "type": "object" }, { "type": "null" }], "title": "Details" }, - "acknowledged": { "type": "boolean", "title": "Acknowledged" }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "run_id", - "table_id", - "alert_type", - "severity", - "message", - "details", - "acknowledged", - "created_at" - ], - "title": "EvaluationAlertRead" - }, - "EvaluationScheduleCreate": { - "properties": { - "dataset_id": { "type": "string", "title": "Dataset Id" }, - "table_scope": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Table Scope" - }, - "cron_expression": { - "type": "string", - "title": "Cron Expression", - "default": "0 2 * * *" - }, - "enabled": { "type": "boolean", "title": "Enabled", "default": true }, - "created_by": { "type": "string", "title": "Created By", "default": "user" } - }, - "type": "object", - "required": ["dataset_id"], - "title": "EvaluationScheduleCreate" - }, - "EvaluationScheduleRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "dataset_id": { "type": "string", "title": "Dataset Id" }, - "table_scope": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Table Scope" - }, - "cron_expression": { "type": "string", "title": "Cron Expression" }, - "enabled": { "type": "boolean", "title": "Enabled" }, - "created_by": { "type": "string", "title": "Created By" }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, - "last_run_at": { - "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], - "title": "Last Run At" - }, - "next_run_at": { - "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], - "title": "Next Run At" - } - }, - "type": "object", - "required": [ - "id", - "dataset_id", - "table_scope", - "cron_expression", - "enabled", - "created_by", - "created_at", - "last_run_at", - "next_run_at" - ], - "title": "EvaluationScheduleRead" - }, - "EvaluationScheduleUpdate": { - "properties": { - "dataset_id": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Dataset Id" - }, - "table_scope": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Table Scope" - }, - "cron_expression": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Cron Expression" - }, - "enabled": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Enabled" } - }, - "type": "object", - "title": "EvaluationScheduleUpdate" - }, - "FeedbackRating": { - "type": "string", - "enum": ["positive", "negative"], - "title": "FeedbackRating" - }, - "GoldenQuestionCreate": { - "properties": { - "question": { "type": "string", "title": "Question" }, - "expected_sql": { "type": "string", "title": "Expected Sql" }, - "difficulty": { "$ref": "#/components/schemas/DifficultyLevel", "default": "simple" }, - "question_type": { "$ref": "#/components/schemas/QuestionType", "default": "simple" }, - "coverage_tags": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Coverage Tags" - } - }, - "type": "object", - "required": ["question", "expected_sql"], - "title": "GoldenQuestionCreate" - }, - "GoldenQuestionRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "type": "string", "title": "Table Id" }, - "question": { "type": "string", "title": "Question" }, - "expected_sql": { "type": "string", "title": "Expected Sql" }, - "difficulty": { "$ref": "#/components/schemas/DifficultyLevel" }, - "question_type": { "$ref": "#/components/schemas/QuestionType" }, - "coverage_tags": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Coverage Tags" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "question", - "expected_sql", - "difficulty", - "question_type", - "coverage_tags", - "created_at" - ], - "title": "GoldenQuestionRead" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { "$ref": "#/components/schemas/ValidationError" }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "HealthStatus": { - "type": "string", - "enum": ["good", "warning", "critical"], - "title": "HealthStatus" - }, - "LoginRequest": { - "properties": { "email": { "type": "string", "title": "Email" } }, - "type": "object", - "required": ["email"], - "title": "LoginRequest" - }, - "ProfilingStatus": { - "type": "string", - "enum": ["pending", "running", "completed", "failed"], - "title": "ProfilingStatus" - }, - "QueryFeedbackCreate": { - "properties": { - "user_id": { "type": "string", "title": "User Id" }, - "query_id": { "type": "string", "title": "Query Id" }, - "table_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" }, - "rating": { "$ref": "#/components/schemas/FeedbackRating" }, - "comment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Comment" }, - "suggested_correction": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Suggested Correction" - } - }, - "type": "object", - "required": ["user_id", "query_id", "rating"], - "title": "QueryFeedbackCreate" - }, - "QueryFeedbackRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "user_id": { "type": "string", "title": "User Id" }, - "query_id": { "type": "string", "title": "Query Id" }, - "table_id": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Table Id" }, - "rating": { "$ref": "#/components/schemas/FeedbackRating" }, - "comment": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Comment" }, - "suggested_correction": { - "anyOf": [{ "type": "string" }, { "type": "null" }], - "title": "Suggested Correction" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" } - }, - "type": "object", - "required": [ - "id", - "user_id", - "query_id", - "table_id", - "rating", - "comment", - "suggested_correction", - "created_at" - ], - "title": "QueryFeedbackRead" - }, - "QuestionType": { - "type": "string", - "enum": ["simple", "complex", "join", "geo", "aggregate", "time_series"], - "title": "QuestionType" - }, - "RejectionNote": { - "properties": { "note": { "type": "string", "title": "Note" } }, - "type": "object", - "required": ["note"], - "title": "RejectionNote" - }, - "SecurityUserRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "email": { "type": "string", "title": "Email" }, - "name": { "type": "string", "title": "Name" }, - "is_active": { "type": "boolean", "title": "Is Active" }, - "is_admin": { "type": "boolean", "title": "Is Admin" }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, - "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } - }, - "type": "object", - "required": ["id", "email", "name", "is_active", "is_admin", "created_at", "updated_at"], - "title": "SecurityUserRead" - }, - "TableCreate": { - "properties": { "oasis_source_id": { "type": "string", "title": "Oasis Source Id" } }, - "type": "object", - "required": ["oasis_source_id"], - "title": "TableCreate" - }, - "TableHealthRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "type": "string", "title": "Table Id" }, - "health_score": { "type": "number", "title": "Health Score" }, - "health_status": { "$ref": "#/components/schemas/HealthStatus" }, - "eval_success_rate": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Eval Success Rate" - }, - "feedback_ratio": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Feedback Ratio" - }, - "data_quality_score": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Data Quality Score" - }, - "schema_drift_flag": { "type": "boolean", "title": "Schema Drift Flag" }, - "failure_wrong_table": { "type": "integer", "title": "Failure Wrong Table" }, - "failure_wrong_sql": { "type": "integer", "title": "Failure Wrong Sql" }, - "failure_empty_result": { "type": "integer", "title": "Failure Empty Result" }, - "failure_execution_error": { "type": "integer", "title": "Failure Execution Error" }, - "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "health_score", - "health_status", - "eval_success_rate", - "feedback_ratio", - "data_quality_score", - "schema_drift_flag", - "failure_wrong_table", - "failure_wrong_sql", - "failure_empty_result", - "failure_execution_error", - "updated_at" - ], - "title": "TableHealthRead" - }, - "TableProfileRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "table_id": { "type": "string", "title": "Table Id" }, - "version": { "type": "integer", "title": "Version" }, - "status": { "$ref": "#/components/schemas/ProfilingStatus" }, - "row_count": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Row Count" - }, - "sample_size": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Sample Size" - }, - "column_count": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Column Count" - }, - "size_bytes": { - "anyOf": [{ "type": "integer" }, { "type": "null" }], - "title": "Size Bytes" - }, - "null_rate_avg": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Null Rate Avg" - }, - "duplicate_rate": { - "anyOf": [{ "type": "number" }, { "type": "null" }], - "title": "Duplicate Rate" - }, - "sample_data": { "anyOf": [{}, { "type": "null" }], "title": "Sample Data" }, - "auto_insights": { - "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], - "title": "Auto Insights" - }, - "profile_json": { "anyOf": [{}, { "type": "null" }], "title": "Profile Json" }, - "cached_until": { - "anyOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }], - "title": "Cached Until" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, - "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } - }, - "type": "object", - "required": [ - "id", - "table_id", - "version", - "status", - "row_count", - "sample_size", - "column_count", - "size_bytes", - "null_rate_avg", - "duplicate_rate", - "sample_data", - "auto_insights", - "profile_json", - "cached_until", - "created_at", - "updated_at" - ], - "title": "TableProfileRead" - }, - "TableRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "name": { "type": "string", "title": "Name" }, - "schema_name": { "type": "string", "title": "Schema Name" }, - "status": { "$ref": "#/components/schemas/TableStatus" }, - "owner_id": { "type": "string", "title": "Owner Id" }, - "oasis_source_id": { "type": "string", "title": "Oasis Source Id" }, - "catalog": { "type": "string", "title": "Catalog" }, - "service": { "type": "string", "title": "Service" }, - "openmetadata_json": { - "anyOf": [{ "type": "object" }, { "type": "null" }], - "title": "Openmetadata Json" - }, - "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, - "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } - }, - "type": "object", - "required": [ - "id", - "name", - "schema_name", - "status", - "owner_id", - "oasis_source_id", - "catalog", - "service", - "openmetadata_json", - "created_at", - "updated_at" - ], - "title": "TableRead" - }, - "TableStatus": { - "type": "string", - "enum": ["draft", "sandbox", "verified", "production", "degraded"], - "title": "TableStatus" - }, - "UserScopeCreate": { - "properties": { - "user_id": { "type": "string", "title": "User Id" }, - "name": { "type": "string", "title": "Name" } - }, - "type": "object", - "required": ["user_id", "name"], - "title": "UserScopeCreate" - }, - "UserScopeRead": { - "properties": { - "id": { "type": "string", "title": "Id" }, - "user_id": { "type": "string", "title": "User Id" }, - "name": { "type": "string", "title": "Name" }, - "is_active": { "type": "boolean", "title": "Is Active" } - }, - "type": "object", - "required": ["id", "user_id", "name", "is_active"], - "title": "UserScopeRead" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, - "type": "array", - "title": "Location" - }, - "msg": { "type": "string", "title": "Message" }, - "type": { "type": "string", "title": "Error Type" } - }, - "type": "object", - "required": ["loc", "msg", "type"], - "title": "ValidationError" - } - } - } -} +{"openapi": "3.1.0", "info": {"title": "Text2SQL Studio API", "description": "Data Intelligence module \u2014 Evaluation Orchestration & Monitoring", "version": "2.0.0"}, "paths": {"/api/tables/{table_id}/health": {"get": {"tags": ["health"], "summary": "Get Table Health", "operationId": "get_table_health_api_tables__table_id__health_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableHealthRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/health/recompute": {"post": {"tags": ["health"], "summary": "Recompute Health", "operationId": "recompute_health_api_tables__table_id__health_recompute_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableHealthRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/health/all": {"get": {"tags": ["health"], "summary": "Get All Health", "description": "Returns the latest health record for every table (used in the table list view).", "operationId": "get_all_health_api_health_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/TableHealthRead"}, "type": "array", "title": "Response Get All Health Api Health All Get"}}}}}}}, "/api/health/esca": {"get": {"tags": ["health"], "summary": "Get Esca Health", "operationId": "get_esca_health_api_health_esca_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/admin/login": {"post": {"tags": ["admin_auth"], "summary": "Login", "description": "Validate that the supplied email belongs to an active admin in security.users.\nReturns the user record on success; raises 403 when the user is not an admin.", "operationId": "login_api_admin_login_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecurityUserRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/tables/pending": {"get": {"tags": ["admin_approval"], "summary": "Get Pending Tables", "description": "Get all tables in 'verified' status (awaiting admin approval).", "operationId": "get_pending_tables_api_admin_tables_pending_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"type": "object"}, "type": "array", "title": "Response Get Pending Tables Api Admin Tables Pending Get"}}}}}}}, "/api/admin/tables/{table_id}/approve": {"post": {"tags": ["admin_approval"], "summary": "Approve Table", "description": "Approve a verified table for production.\n\nActions:\n 1. Set table.status = production\n 2. Sync its golden questions to the shared 'text2sql_production' Langfuse dataset", "operationId": "approve_table_api_admin_tables__table_id__approve_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/admin/tables/{table_id}/reject": {"post": {"tags": ["admin_approval"], "summary": "Reject Table", "description": "Reject a verified table, returning it to sandbox.", "operationId": "reject_table_api_admin_tables__table_id__reject_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RejectionNote"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/agent/chat": {"post": {"tags": ["agent"], "summary": "Chat", "description": "Start a new agent session or resume an interrupted one.\n\n- First call: provide `query` (and optionally `allowed_tables`, `allowed_statuses`, `extractors`).\n- Resume call: provide `thread_id` + `resume_value` (`{\"approved\": true}` or\n `{\"approved\": false, \"feedback\": \"...\"}`).\n\nThe backend forwards the request to the agent MCP service and returns the\nstructured result. The frontend only deals with this endpoint.", "operationId": "chat_api_agent_chat_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/agent/stream/{thread_id}": {"get": {"tags": ["agent"], "summary": "Stream Agent Execution", "description": "Subscribe to Redis PubSub for agent graph execution events and yield them as SSE.", "operationId": "stream_agent_execution_api_agent_stream__thread_id__get", "parameters": [{"name": "thread_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Thread Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/agent/traces/{trace_id}": {"get": {"tags": ["agent"], "summary": "Get Trace Timeline", "description": "Fetch trace from Langfuse and normalize observations for frontend timeline.", "operationId": "get_trace_timeline_api_agent_traces__trace_id__get", "parameters": [{"name": "trace_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Trace Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/agent/suggest_fixes": {"post": {"tags": ["agent"], "summary": "Suggest Fixes", "description": "Generate quick fixes during HITL interruption via MCP.", "operationId": "suggest_fixes_api_agent_suggest_fixes_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuggestFixesRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/login/{provider}": {"get": {"tags": ["auth"], "summary": "Login", "operationId": "login_api_v1_auth_login__provider__get", "parameters": [{"name": "provider", "in": "path", "required": true, "schema": {"type": "string", "title": "Provider"}}, {"name": "next_url", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next Url"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/callback/{provider}": {"get": {"tags": ["auth"], "summary": "Auth Callback", "operationId": "auth_callback_api_v1_auth_callback__provider__get", "parameters": [{"name": "provider", "in": "path", "required": true, "schema": {"type": "string", "title": "Provider"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/logout": {"get": {"tags": ["auth"], "summary": "Logout", "operationId": "logout_api_v1_auth_logout_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/auth/config": {"get": {"tags": ["auth"], "summary": "Get Auth Config", "operationId": "get_auth_config_api_v1_auth_config_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AuthConfigRead"}}}}}}}, "/api/v1/auth/me": {"get": {"tags": ["auth"], "summary": "Get Me", "operationId": "get_me_api_v1_auth_me_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecurityUserRead"}}}}}}}, "/api/tables": {"get": {"tags": ["tables"], "summary": "List Tables", "operationId": "list_tables_api_tables_get", "parameters": [{"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"$ref": "#/components/schemas/TableStatus"}, {"type": "null"}], "title": "Status"}}, {"name": "owner_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Id"}}, {"name": "search", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search"}}, {"name": "x-scope-id", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Scope-Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/TableRead"}, "title": "Response List Tables Api Tables Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["tables"], "summary": "Create Table", "operationId": "create_table_api_tables_post", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}": {"get": {"tags": ["tables"], "summary": "Get Table", "operationId": "get_table_api_tables__table_id__get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/sync-schema": {"post": {"tags": ["tables"], "summary": "Sync Table Schema", "operationId": "sync_table_schema_api_tables__table_id__sync_schema_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/status": {"patch": {"tags": ["tables"], "summary": "Update Table Status", "description": "Update a table's status.", "operationId": "update_table_status_api_tables__table_id__status_patch", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "status", "in": "query", "required": true, "schema": {"$ref": "#/components/schemas/TableStatus"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/foreign-keys": {"get": {"tags": ["tables"], "summary": "Get Foreign Keys", "description": "Get all custom foreign key mappings for a table.", "operationId": "get_foreign_keys_api_tables__table_id__foreign_keys_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ForeignKeyMappingRead"}, "title": "Response Get Foreign Keys Api Tables Table Id Foreign Keys Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["tables"], "summary": "Create Foreign Key", "description": "Create or update a foreign key mapping for a specific column in the table.", "operationId": "create_foreign_key_api_tables__table_id__foreign_keys_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForeignKeyMappingCreate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForeignKeyMappingRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/foreign-keys/{fk_id}": {"delete": {"tags": ["tables"], "summary": "Delete Foreign Key", "description": "Delete a specific foreign key mapping.", "operationId": "delete_foreign_key_api_tables__table_id__foreign_keys__fk_id__delete", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "fk_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Fk Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/enrichment": {"post": {"tags": ["enrichment"], "summary": "Create Enrichment", "description": "Save a new enrichment version for a table.\n\nIf the table is currently in 'production' and the new enrichment\nchanges the table_description or schema fields, the table is\nautomatically moved to 'degraded'.\n\nThis forces a full re-evaluation cycle before the table can be\npromoted to production again.", "operationId": "create_enrichment_api_tables__table_id__enrichment_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnrichmentCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnrichmentRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/enrichment/latest": {"get": {"tags": ["enrichment"], "summary": "Get Latest Enrichment", "operationId": "get_latest_enrichment_api_tables__table_id__enrichment_latest_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnrichmentRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/questions": {"get": {"tags": ["golden-questions"], "summary": "List Questions", "operationId": "list_questions_api_tables__table_id__questions_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/GoldenQuestionRead"}, "title": "Response List Questions Api Tables Table Id Questions Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["golden-questions"], "summary": "Create Question", "operationId": "create_question_api_tables__table_id__questions_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoldenQuestionCreate"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoldenQuestionRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/questions/upload": {"post": {"tags": ["golden-questions"], "summary": "Upload Questions", "operationId": "upload_questions_api_tables__table_id__questions_upload_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_questions_api_tables__table_id__questions_upload_post"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/questions/{question_id}": {"delete": {"tags": ["golden-questions"], "summary": "Delete Question", "operationId": "delete_question_api_tables__table_id__questions__question_id__delete", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "question_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Question Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/readiness": {"get": {"tags": ["evaluation"], "summary": "Get Readiness", "operationId": "get_readiness_api_eval_readiness_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/tables/{table_id}/eval/run": {"post": {"tags": ["evaluation"], "summary": "Trigger Eval", "operationId": "trigger_eval_api_tables__table_id__eval_run_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvalRunRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/eval/runs": {"get": {"tags": ["evaluation"], "summary": "List Runs", "operationId": "list_runs_api_tables__table_id__eval_runs_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvalRunRead"}, "title": "Response List Runs Api Tables Table Id Eval Runs Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/runs/all": {"get": {"tags": ["evaluation"], "summary": "Get All Eval Runs", "operationId": "get_all_eval_runs_api_eval_runs_all_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/EvalRunRead"}, "type": "array", "title": "Response Get All Eval Runs Api Eval Runs All Get"}}}}}}}, "/api/eval/batch/{promotion_run_id}": {"get": {"tags": ["evaluation"], "summary": "Get Batch Runs", "operationId": "get_batch_runs_api_eval_batch__promotion_run_id__get", "parameters": [{"name": "promotion_run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Promotion Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvalRunRead"}, "title": "Response Get Batch Runs Api Eval Batch Promotion Run Id Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/{run_id}": {"get": {"tags": ["evaluation"], "summary": "Get Run", "operationId": "get_run_api_eval__run_id__get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvalRunRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/{run_id}/results": {"get": {"tags": ["evaluation"], "summary": "Get Results", "operationId": "get_results_api_eval__run_id__results_get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvalResultRead"}, "title": "Response Get Results Api Eval Run Id Results Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/{run_id}/report": {"get": {"tags": ["evaluation"], "summary": "Get Run Report", "operationId": "get_run_report_api_eval__run_id__report_get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/eval/{run_id}/regression-diff": {"get": {"tags": ["evaluation"], "summary": "Get Regression Diff", "description": "For a promotion-regression run, return questions that passed the baseline\nbut failed in the regression \u2014 true regressions introduced by the new candidate table.", "operationId": "get_regression_diff_api_eval__run_id__regression_diff_get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/extractors": {"get": {"tags": ["extractors"], "summary": "List Extractors", "description": "List all registered HTTP extractors.", "operationId": "list_extractors_api_extractors_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/HttpExtractorRead"}, "type": "array", "title": "Response List Extractors Api Extractors Get"}}}}}}, "post": {"tags": ["extractors"], "summary": "Create Extractor", "description": "Register a new HTTP extractor.", "operationId": "create_extractor_api_extractors_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HttpExtractorCreate"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HttpExtractorRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/extractors/{extractor_id}": {"delete": {"tags": ["extractors"], "summary": "Delete Extractor", "description": "Delete an HTTP extractor by ID.", "operationId": "delete_extractor_api_extractors__extractor_id__delete", "parameters": [{"name": "extractor_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Extractor Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/run": {"post": {"tags": ["evaluation-orchestration"], "summary": "Trigger Evaluation Run", "description": "Trigger evaluation for one or more tables.", "operationId": "trigger_evaluation_run_api_evaluations_run_post", "parameters": [{"name": "triggered_by", "in": "query", "required": false, "schema": {"type": "string", "default": "user", "title": "Triggered By"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "array", "items": {"type": "string"}, "title": "Table Ids"}}}}, "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvalRunRead"}, "title": "Response Trigger Evaluation Run Api Evaluations Run Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/runs": {"get": {"tags": ["evaluation-orchestration"], "summary": "List Runs", "operationId": "list_runs_api_evaluations_runs_get", "parameters": [{"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "default": 50, "title": "Limit"}}, {"name": "offset", "in": "query", "required": false, "schema": {"type": "integer", "default": 0, "title": "Offset"}}, {"name": "status", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}}, {"name": "table_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvalRunRead"}, "title": "Response List Runs Api Evaluations Runs Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/runs/{run_id}": {"get": {"tags": ["evaluation-orchestration"], "summary": "Get Run", "operationId": "get_run_api_evaluations_runs__run_id__get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvalRunRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/runs/{run_id}/report": {"get": {"tags": ["evaluation-orchestration"], "summary": "Get Run Report", "description": "Full structured report \u2014 matches the evaluation_pipeline.md format.", "operationId": "get_run_report_api_evaluations_runs__run_id__report_get", "parameters": [{"name": "run_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Run Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/schedules": {"get": {"tags": ["evaluation-orchestration"], "summary": "List Schedules", "operationId": "list_schedules_api_evaluations_schedules_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/EvaluationScheduleRead"}, "type": "array", "title": "Response List Schedules Api Evaluations Schedules Get"}}}}}}, "post": {"tags": ["evaluation-orchestration"], "summary": "Create Schedule", "operationId": "create_schedule_api_evaluations_schedules_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluationScheduleCreate"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluationScheduleRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/schedules/{schedule_id}": {"put": {"tags": ["evaluation-orchestration"], "summary": "Update Schedule", "operationId": "update_schedule_api_evaluations_schedules__schedule_id__put", "parameters": [{"name": "schedule_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Schedule Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluationScheduleUpdate"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluationScheduleRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["evaluation-orchestration"], "summary": "Delete Schedule", "operationId": "delete_schedule_api_evaluations_schedules__schedule_id__delete", "parameters": [{"name": "schedule_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Schedule Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/analytics/trends": {"get": {"tags": ["evaluation-orchestration"], "summary": "Get Trends", "description": "Score and pass_rate over time. Returns one data point per completed run.", "operationId": "get_trends_api_evaluations_analytics_trends_get", "parameters": [{"name": "days", "in": "query", "required": false, "schema": {"type": "integer", "default": 30, "title": "Days"}}, {"name": "table_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/analytics/tables": {"get": {"tags": ["evaluation-orchestration"], "summary": "Get Table Analytics", "description": "Per-table performance ranking.", "operationId": "get_table_analytics_api_evaluations_analytics_tables_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/evaluations/compare": {"get": {"tags": ["evaluation-orchestration"], "summary": "Compare Runs", "description": "Side-by-side comparison of two eval runs.", "operationId": "compare_runs_api_evaluations_compare_get", "parameters": [{"name": "run1", "in": "query", "required": true, "schema": {"type": "string", "title": "Run1"}}, {"name": "run2", "in": "query", "required": true, "schema": {"type": "string", "title": "Run2"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/alerts": {"get": {"tags": ["evaluation-orchestration"], "summary": "List Alerts", "operationId": "list_alerts_api_evaluations_alerts_get", "parameters": [{"name": "acknowledged", "in": "query", "required": false, "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Acknowledged"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 50, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EvaluationAlertRead"}, "title": "Response List Alerts Api Evaluations Alerts Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/alerts/{alert_id}/acknowledge": {"post": {"tags": ["evaluation-orchestration"], "summary": "Acknowledge Alert", "operationId": "acknowledge_alert_api_evaluations_alerts__alert_id__acknowledge_post", "parameters": [{"name": "alert_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Alert Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EvaluationAlertRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/evaluations/system-health": {"get": {"tags": ["evaluation-orchestration"], "summary": "System Health", "description": "Aggregate system health for the control center dashboard.", "operationId": "system_health_api_evaluations_system_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/tables/{table_id}/publish": {"post": {"tags": ["publish"], "summary": "Publish Table", "operationId": "publish_table_api_tables__table_id__publish_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/scopes": {"get": {"tags": ["scopes"], "summary": "List Scopes", "operationId": "list_scopes_api_scopes_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/UserScopeRead"}, "type": "array", "title": "Response List Scopes Api Scopes Get"}}}}}}, "post": {"tags": ["scopes"], "summary": "Create Scope", "operationId": "create_scope_api_scopes_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserScopeCreate"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserScopeRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/scopes/{scope_id}/activate": {"post": {"tags": ["scopes"], "summary": "Activate Scope", "operationId": "activate_scope_api_scopes__scope_id__activate_post", "parameters": [{"name": "scope_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Scope Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserScopeRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/audit/queries": {"get": {"tags": ["audit"], "summary": "List Audit Queries", "operationId": "list_audit_queries_api_audit_queries_get", "parameters": [{"name": "table_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}}, {"name": "user_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "default": 50, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/AuditQueryRead"}, "title": "Response List Audit Queries Api Audit Queries Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/profile": {"get": {"tags": ["profiling"], "summary": "Get Table Profile", "operationId": "get_table_profile_api_tables__table_id__profile_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProfileRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/all/profile/run": {"post": {"tags": ["profiling"], "summary": "Run All Profiles", "description": "Triggers profiling for all registered tables.\nIdeal for Airflow DAGs to keep profiles up-to-date.", "operationId": "run_all_profiles_api_tables_all_profile_run_post", "parameters": [{"name": "force", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Force"}}], "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/profile/run": {"post": {"tags": ["profiling"], "summary": "Run Table Profile", "description": "Trigger a new profiling run against Trino.\nReturns immediately (202) while profiling runs in the background.\nRespects a 24h cache unless force=True.", "operationId": "run_table_profile_api_tables__table_id__profile_run_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "force", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Force"}}], "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TableProfileRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/profile/columns": {"get": {"tags": ["profiling"], "summary": "Get Column Profiles", "operationId": "get_column_profiles_api_tables__table_id__profile_columns_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/ColumnProfileRead"}, "title": "Response Get Column Profiles Api Tables Table Id Profile Columns Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/columns/{column}/profile": {"get": {"tags": ["profiling"], "summary": "Get Single Column Profile", "operationId": "get_single_column_profile_api_tables__table_id__columns__column__profile_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "column", "in": "path", "required": true, "schema": {"type": "string", "title": "Column"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ColumnProfileRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/profile/context": {"get": {"tags": ["profiling"], "summary": "Get Profile Context", "description": "Returns a compact, LLM-ready context blob built from the latest\ncompleted profile. Used by the TextToSQL context builder for\nsystem-prompt injection, enrichment suggestions, and join suggestions.", "operationId": "get_profile_context_api_tables__table_id__profile_context_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "object", "title": "Response Get Profile Context Api Tables Table Id Profile Context Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/tables/{table_id}/cross-profile": {"post": {"tags": ["profiling"], "summary": "Cross Profile", "description": "Discover cross-table join suggestions based on profiling statistics.", "operationId": "cross_profile_api_tables__table_id__cross_profile_post", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/CrossTableProfileRead"}, "title": "Response Cross Profile Api Tables Table Id Cross Profile Post"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["profiling"], "summary": "Get Cross Profiles", "operationId": "get_cross_profiles_api_tables__table_id__cross_profile_get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/CrossTableProfileRead"}, "title": "Response Get Cross Profiles Api Tables Table Id Cross Profile Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/feedback": {"post": {"tags": ["feedback"], "summary": "Submit Feedback", "operationId": "submit_feedback_api_feedback_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/QueryFeedbackCreate"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QueryFeedbackRead"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/feedback/table/{table_id}": {"get": {"tags": ["feedback"], "summary": "Get Table Feedback", "operationId": "get_table_feedback_api_feedback_table__table_id__get", "parameters": [{"name": "table_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Table Id"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "default": 50, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/QueryFeedbackRead"}, "title": "Response Get Table Feedback Api Feedback Table Table Id Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/feedback/query/{query_id}": {"get": {"tags": ["feedback"], "summary": "Get Query Feedback", "operationId": "get_query_feedback_api_feedback_query__query_id__get", "parameters": [{"name": "query_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Query Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/QueryFeedbackRead"}, "title": "Response Get Query Feedback Api Feedback Query Query Id Get"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/health": {"get": {"summary": "Health Check", "operationId": "health_check_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AlertSeverity": {"type": "string", "enum": ["info", "warning", "critical"], "title": "AlertSeverity"}, "AuditQueryRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}, "user_id": {"type": "string", "title": "User Id"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "raw_question": {"type": "string", "title": "Raw Question"}, "normalized_question": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Normalized Question"}, "tables_accessed": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Tables Accessed"}, "final_sql": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Final Sql"}, "result_row_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Result Row Count"}, "result_columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Result Columns"}, "execution_time_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Execution Time Ms"}, "refiner_iterations": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Refiner Iterations"}, "status": {"type": "string", "title": "Status"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "langfuse_trace_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Langfuse Trace Id"}, "confidence_score": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Confidence Score"}, "explanation_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Explanation Text"}, "warnings_json": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Warnings Json"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "table_id", "user_id", "session_id", "raw_question", "normalized_question", "tables_accessed", "final_sql", "result_row_count", "result_columns", "execution_time_ms", "refiner_iterations", "status", "error_message", "langfuse_trace_id", "confidence_score", "explanation_text", "warnings_json", "created_at"], "title": "AuditQueryRead"}, "AuthConfigRead": {"properties": {"ENABLE_KEYCLOAK": {"type": "boolean", "title": "Enable Keycloak"}, "ENABLE_GOOGLE": {"type": "boolean", "title": "Enable Google"}}, "type": "object", "required": ["ENABLE_KEYCLOAK", "ENABLE_GOOGLE"], "title": "AuthConfigRead"}, "Body_upload_questions_api_tables__table_id__questions_upload_post": {"properties": {"file": {"type": "string", "format": "binary", "title": "File"}}, "type": "object", "required": ["file"], "title": "Body_upload_questions_api_tables__table_id__questions_upload_post"}, "ChatRequest": {"properties": {"query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Query"}, "thread_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Thread Id"}, "resume_value": {"anyOf": [{"$ref": "#/components/schemas/QueryApproval"}, {"type": "string"}, {"type": "object"}, {"type": "null"}], "title": "Resume Value"}, "allowed_tables": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Tables"}, "allowed_statuses": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Statuses"}, "extractors": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Extractors"}, "active_skills": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Active Skills"}, "execution_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Execution Mode"}, "hitl_enabled": {"type": "boolean", "title": "Hitl Enabled", "default": true}}, "type": "object", "title": "ChatRequest"}, "ChatResponse": {"properties": {"thread_id": {"type": "string", "title": "Thread Id"}, "status": {"type": "string", "title": "Status"}, "interrupt_details": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Interrupt Details"}, "summary": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Summary"}, "raw_data_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Raw Data Ref"}, "sql_query": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Query"}, "sql_explanation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sql Explanation"}, "schema_plan": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schema Plan"}, "trace_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Trace Id"}, "execution_path": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Execution Path"}}, "type": "object", "required": ["thread_id", "status"], "title": "ChatResponse"}, "ColumnProfileRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "profile_id": {"type": "string", "title": "Profile Id"}, "column_name": {"type": "string", "title": "Column Name"}, "data_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Data Type"}, "null_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Null Count"}, "null_rate": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Null Rate"}, "distinct_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Distinct Count"}, "min_value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Min Value"}, "max_value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Max Value"}, "avg_value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Avg Value"}, "median_value": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Median Value"}, "top_values": {"anyOf": [{}, {"type": "null"}], "title": "Top Values"}, "is_categorical": {"type": "boolean", "title": "Is Categorical"}, "is_geo": {"type": "boolean", "title": "Is Geo"}, "is_time": {"type": "boolean", "title": "Is Time"}, "semantic_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Semantic Type"}, "stats_json": {"anyOf": [{}, {"type": "null"}], "title": "Stats Json"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "table_id", "profile_id", "column_name", "data_type", "null_count", "null_rate", "distinct_count", "min_value", "max_value", "avg_value", "median_value", "top_values", "is_categorical", "is_geo", "is_time", "semantic_type", "stats_json", "created_at"], "title": "ColumnProfileRead"}, "CrossTableProfileRead": {"properties": {"id": {"type": "string", "title": "Id"}, "source_table_id": {"type": "string", "title": "Source Table Id"}, "target_table_id": {"type": "string", "title": "Target Table Id"}, "join_suggestion": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Join Suggestion"}, "match_strength": {"type": "string", "title": "Match Strength"}, "common_columns": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Common Columns"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "source_table_id", "target_table_id", "join_suggestion", "match_strength", "common_columns", "created_at"], "title": "CrossTableProfileRead"}, "DifficultyLevel": {"type": "string", "enum": ["simple", "medium", "complex"], "title": "DifficultyLevel"}, "EnrichmentCreate": {"properties": {"data": {"type": "object", "title": "Data"}}, "type": "object", "required": ["data"], "title": "EnrichmentCreate"}, "EnrichmentRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "version": {"type": "integer", "title": "Version"}, "data": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Data"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "table_id", "version", "data", "created_at"], "title": "EnrichmentRead"}, "EvalResultRead": {"properties": {"id": {"type": "string", "title": "Id"}, "run_id": {"type": "string", "title": "Run Id"}, "question_id": {"type": "string", "title": "Question Id"}, "score": {"type": "number", "title": "Score"}, "status": {"type": "string", "title": "Status"}, "error_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Type"}}, "type": "object", "required": ["id", "run_id", "question_id", "score", "status", "error_type"], "title": "EvalResultRead"}, "EvalRunRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}, "table_name": {"type": "string", "title": "Table Name"}, "dataset_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dataset Id"}, "score": {"type": "number", "title": "Score"}, "pass_rate": {"type": "number", "title": "Pass Rate"}, "fail_rate": {"type": "number", "title": "Fail Rate"}, "total_questions": {"type": "integer", "title": "Total Questions"}, "duration_seconds": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Duration Seconds"}, "triggered_by": {"type": "string", "title": "Triggered By"}, "status": {"$ref": "#/components/schemas/EvalStatus"}, "started_at": {"type": "string", "format": "date-time", "title": "Started At"}, "completed_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Completed At"}, "failure_breakdown": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Failure Breakdown"}, "dimension_averages": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Dimension Averages"}, "regression_detected": {"type": "boolean", "title": "Regression Detected"}, "regression_delta": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Regression Delta"}, "promotion_run_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Promotion Run Id"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "table_id", "table_name", "dataset_id", "score", "pass_rate", "fail_rate", "total_questions", "duration_seconds", "triggered_by", "status", "started_at", "completed_at", "failure_breakdown", "dimension_averages", "regression_detected", "regression_delta", "created_at"], "title": "EvalRunRead"}, "EvalStatus": {"type": "string", "enum": ["running", "completed", "failed"], "title": "EvalStatus"}, "EvaluationAlertRead": {"properties": {"id": {"type": "string", "title": "Id"}, "run_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Run Id"}, "table_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}, "alert_type": {"type": "string", "title": "Alert Type"}, "severity": {"$ref": "#/components/schemas/AlertSeverity"}, "message": {"type": "string", "title": "Message"}, "details": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Details"}, "acknowledged": {"type": "boolean", "title": "Acknowledged"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "run_id", "table_id", "alert_type", "severity", "message", "details", "acknowledged", "created_at"], "title": "EvaluationAlertRead"}, "EvaluationScheduleCreate": {"properties": {"dataset_id": {"type": "string", "title": "Dataset Id"}, "table_scope": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Table Scope"}, "cron_expression": {"type": "string", "title": "Cron Expression", "default": "0 2 * * *"}, "enabled": {"type": "boolean", "title": "Enabled", "default": true}, "created_by": {"type": "string", "title": "Created By", "default": "user"}}, "type": "object", "required": ["dataset_id"], "title": "EvaluationScheduleCreate"}, "EvaluationScheduleRead": {"properties": {"id": {"type": "string", "title": "Id"}, "dataset_id": {"type": "string", "title": "Dataset Id"}, "table_scope": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Table Scope"}, "cron_expression": {"type": "string", "title": "Cron Expression"}, "enabled": {"type": "boolean", "title": "Enabled"}, "created_by": {"type": "string", "title": "Created By"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "last_run_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Run At"}, "next_run_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Next Run At"}}, "type": "object", "required": ["id", "dataset_id", "table_scope", "cron_expression", "enabled", "created_by", "created_at", "last_run_at", "next_run_at"], "title": "EvaluationScheduleRead"}, "EvaluationScheduleUpdate": {"properties": {"dataset_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dataset Id"}, "table_scope": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Table Scope"}, "cron_expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cron Expression"}, "enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Enabled"}}, "type": "object", "title": "EvaluationScheduleUpdate"}, "ExtractorStatus": {"type": "string", "enum": ["draft", "sandbox", "verified", "production", "degraded"], "title": "ExtractorStatus"}, "FeedbackRating": {"type": "string", "enum": ["positive", "negative"], "title": "FeedbackRating"}, "ForeignKeyMappingCreate": {"properties": {"source_column": {"type": "string", "title": "Source Column"}, "target_table_id": {"type": "string", "title": "Target Table Id"}, "target_column": {"type": "string", "title": "Target Column"}}, "type": "object", "required": ["source_column", "target_table_id", "target_column"], "title": "ForeignKeyMappingCreate"}, "ForeignKeyMappingRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "source_column": {"type": "string", "title": "Source Column"}, "target_table_id": {"type": "string", "title": "Target Table Id"}, "target_column": {"type": "string", "title": "Target Column"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "table_id", "source_column", "target_table_id", "target_column", "created_at", "updated_at"], "title": "ForeignKeyMappingRead"}, "GoldenQuestionCreate": {"properties": {"question": {"type": "string", "title": "Question"}, "expected_sql": {"type": "string", "title": "Expected Sql"}, "difficulty": {"$ref": "#/components/schemas/DifficultyLevel", "default": "simple"}, "question_type": {"$ref": "#/components/schemas/QuestionType", "default": "simple"}, "coverage_tags": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Coverage Tags"}}, "type": "object", "required": ["question", "expected_sql"], "title": "GoldenQuestionCreate"}, "GoldenQuestionRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "question": {"type": "string", "title": "Question"}, "expected_sql": {"type": "string", "title": "Expected Sql"}, "difficulty": {"$ref": "#/components/schemas/DifficultyLevel"}, "question_type": {"$ref": "#/components/schemas/QuestionType"}, "coverage_tags": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Coverage Tags"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "table_id", "question", "expected_sql", "difficulty", "question_type", "coverage_tags", "created_at"], "title": "GoldenQuestionRead"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "HealthStatus": {"type": "string", "enum": ["good", "warning", "critical"], "title": "HealthStatus"}, "HttpExtractorCreate": {"properties": {"name": {"type": "string", "title": "Name"}, "url": {"type": "string", "title": "Url"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "status": {"$ref": "#/components/schemas/ExtractorStatus", "default": "draft"}}, "type": "object", "required": ["name", "url"], "title": "HttpExtractorCreate"}, "HttpExtractorRead": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "url": {"type": "string", "title": "Url"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "status": {"$ref": "#/components/schemas/ExtractorStatus"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "name", "url", "description", "status", "created_at", "updated_at"], "title": "HttpExtractorRead"}, "LoginRequest": {"properties": {"email": {"type": "string", "title": "Email"}}, "type": "object", "required": ["email"], "title": "LoginRequest"}, "ProfilingStatus": {"type": "string", "enum": ["pending", "running", "completed", "failed"], "title": "ProfilingStatus"}, "QueryApproval": {"properties": {"approved": {"type": "boolean", "title": "Approved"}, "feedback": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Feedback"}, "rejection_category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Rejection Category"}, "suggested_fix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suggested Fix"}}, "type": "object", "required": ["approved"], "title": "QueryApproval"}, "QueryFeedbackCreate": {"properties": {"user_id": {"type": "string", "title": "User Id"}, "query_id": {"type": "string", "title": "Query Id"}, "table_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}, "rating": {"$ref": "#/components/schemas/FeedbackRating"}, "comment": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comment"}, "suggested_correction": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suggested Correction"}}, "type": "object", "required": ["user_id", "query_id", "rating"], "title": "QueryFeedbackCreate"}, "QueryFeedbackRead": {"properties": {"id": {"type": "string", "title": "Id"}, "user_id": {"type": "string", "title": "User Id"}, "query_id": {"type": "string", "title": "Query Id"}, "table_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Table Id"}, "rating": {"$ref": "#/components/schemas/FeedbackRating"}, "comment": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comment"}, "suggested_correction": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Suggested Correction"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "user_id", "query_id", "table_id", "rating", "comment", "suggested_correction", "created_at"], "title": "QueryFeedbackRead"}, "QuestionType": {"type": "string", "enum": ["simple", "complex", "join", "geo", "aggregate", "time_series"], "title": "QuestionType"}, "RejectionNote": {"properties": {"note": {"type": "string", "title": "Note"}}, "type": "object", "required": ["note"], "title": "RejectionNote"}, "SecurityUserRead": {"properties": {"id": {"type": "string", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "name": {"type": "string", "title": "Name"}, "is_active": {"type": "boolean", "title": "Is Active"}, "is_admin": {"type": "boolean", "title": "Is Admin"}, "provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "email", "name", "is_active", "is_admin", "provider", "created_at", "updated_at"], "title": "SecurityUserRead"}, "SuggestFixesRequest": {"properties": {"thread_id": {"type": "string", "title": "Thread Id"}, "category": {"type": "string", "title": "Category"}}, "type": "object", "required": ["thread_id", "category"], "title": "SuggestFixesRequest"}, "TableCreate": {"properties": {"oasis_source_id": {"type": "string", "title": "Oasis Source Id"}}, "type": "object", "required": ["oasis_source_id"], "title": "TableCreate"}, "TableHealthRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "health_score": {"type": "number", "title": "Health Score"}, "health_status": {"$ref": "#/components/schemas/HealthStatus"}, "eval_success_rate": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Eval Success Rate"}, "feedback_ratio": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Feedback Ratio"}, "data_quality_score": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Data Quality Score"}, "schema_drift_flag": {"type": "boolean", "title": "Schema Drift Flag"}, "failure_wrong_table": {"type": "integer", "title": "Failure Wrong Table"}, "failure_wrong_sql": {"type": "integer", "title": "Failure Wrong Sql"}, "failure_empty_result": {"type": "integer", "title": "Failure Empty Result"}, "failure_execution_error": {"type": "integer", "title": "Failure Execution Error"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "table_id", "health_score", "health_status", "eval_success_rate", "feedback_ratio", "data_quality_score", "schema_drift_flag", "failure_wrong_table", "failure_wrong_sql", "failure_empty_result", "failure_execution_error", "updated_at"], "title": "TableHealthRead"}, "TableProfileRead": {"properties": {"id": {"type": "string", "title": "Id"}, "table_id": {"type": "string", "title": "Table Id"}, "status": {"$ref": "#/components/schemas/ProfilingStatus"}, "row_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Row Count"}, "sample_size": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Sample Size"}, "column_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Column Count"}, "size_bytes": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Size Bytes"}, "null_rate_avg": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Null Rate Avg"}, "duplicate_rate": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Duplicate Rate"}, "sample_data": {"anyOf": [{}, {"type": "null"}], "title": "Sample Data"}, "auto_insights": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Auto Insights"}, "profile_json": {"anyOf": [{}, {"type": "null"}], "title": "Profile Json"}, "cached_until": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Cached Until"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "table_id", "status", "row_count", "sample_size", "column_count", "size_bytes", "null_rate_avg", "duplicate_rate", "sample_data", "auto_insights", "profile_json", "cached_until", "created_at", "updated_at"], "title": "TableProfileRead"}, "TableRead": {"properties": {"id": {"type": "string", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "schema_name": {"type": "string", "title": "Schema Name"}, "status": {"$ref": "#/components/schemas/TableStatus"}, "owner_id": {"type": "string", "title": "Owner Id"}, "oasis_source_id": {"type": "string", "title": "Oasis Source Id"}, "catalog": {"type": "string", "title": "Catalog"}, "service": {"type": "string", "title": "Service"}, "openmetadata_json": {"anyOf": [{"type": "object"}, {"type": "null"}], "title": "Openmetadata Json"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"type": "string", "format": "date-time", "title": "Updated At"}}, "type": "object", "required": ["id", "name", "schema_name", "status", "owner_id", "oasis_source_id", "catalog", "service", "openmetadata_json", "created_at", "updated_at"], "title": "TableRead"}, "TableStatus": {"type": "string", "enum": ["draft", "sandbox", "verified", "production", "degraded"], "title": "TableStatus"}, "UserScopeCreate": {"properties": {"user_id": {"type": "string", "title": "User Id"}, "name": {"type": "string", "title": "Name"}}, "type": "object", "required": ["user_id", "name"], "title": "UserScopeCreate"}, "UserScopeRead": {"properties": {"id": {"type": "string", "title": "Id"}, "user_id": {"type": "string", "title": "User Id"}, "name": {"type": "string", "title": "Name"}, "is_active": {"type": "boolean", "title": "Is Active"}}, "type": "object", "required": ["id", "user_id", "name", "is_active"], "title": "UserScopeRead"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}} \ No newline at end of file diff --git a/frontend/src/api/agent.ts b/frontend/src/api/agent.ts index 5822eb1..705b374 100644 --- a/frontend/src/api/agent.ts +++ b/frontend/src/api/agent.ts @@ -17,35 +17,11 @@ api.interceptors.response.use( }, ); -export interface QueryApproval { - approved: boolean; - rejection_category?: string; - feedback?: string; - suggested_fix?: string; -} +import type { components } from './schema'; -export interface ChatRequest { - query?: string; - thread_id?: string; - resume_value?: QueryApproval | string; - allowed_tables?: string[]; - allowed_statuses?: string[]; - extractors?: string[]; - hitl_enabled?: boolean; -} - -export interface ChatResponse { - thread_id: string; - status: 'completed' | 'interrupted'; - interrupt_details?: Record; - summary?: string; - raw_data_ref?: string; - sql_query?: string; - sql_explanation?: string; - schema_plan?: string; - trace_id?: string; - execution_path?: string[]; -} +export type QueryApproval = components['schemas']['QueryApproval']; +export type ChatRequest = components['schemas']['ChatRequest']; +export type ChatResponse = components['schemas']['ChatResponse']; export const agentApi = { chat: (payload: ChatRequest): Promise => diff --git a/frontend/src/api/schema.d.ts b/frontend/src/api/schema.d.ts index 2112c1a..f8e6bf4 100644 --- a/frontend/src/api/schema.d.ts +++ b/frontend/src/api/schema.d.ts @@ -4,3616 +4,4193 @@ */ export interface paths { - '/tables': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Tables */ - get: operations['list_tables_tables_get']; - put?: never; - /** Create Table */ - post: operations['create_table_tables_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Table */ - get: operations['get_table_tables__table_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/sync-schema': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Sync Table Schema */ - post: operations['sync_table_schema_tables__table_id__sync_schema_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/status': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - /** - * Update Table Status - * @description Update a table's status. - */ - patch: operations['update_table_status_tables__table_id__status_patch']; - trace?: never; - }; - '/tables/{table_id}/foreign-keys': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Foreign Keys - * @description Get all custom foreign key mappings for a table. - */ - get: operations['get_foreign_keys_tables__table_id__foreign_keys_get']; - put?: never; - /** - * Create Foreign Key - * @description Create or update a foreign key mapping for a specific column in the table. - */ - post: operations['create_foreign_key_tables__table_id__foreign_keys_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/foreign-keys/{fk_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Delete Foreign Key - * @description Delete a specific foreign key mapping. - */ - delete: operations['delete_foreign_key_tables__table_id__foreign_keys__fk_id__delete']; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/enrichment': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Create Enrichment - * @description Save a new enrichment version for a table. - * - * If the table is currently in 'production' and the new enrichment - * changes the table_description or schema fields, the table is - * automatically moved to 'degraded'. - * - * This forces a full re-evaluation cycle before the table can be - * promoted to production again. - */ - post: operations['create_enrichment_tables__table_id__enrichment_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/enrichment/latest': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Latest Enrichment */ - get: operations['get_latest_enrichment_tables__table_id__enrichment_latest_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/questions': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Questions */ - get: operations['list_questions_tables__table_id__questions_get']; - put?: never; - /** Create Question */ - post: operations['create_question_tables__table_id__questions_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/questions/upload': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Upload Questions */ - post: operations['upload_questions_tables__table_id__questions_upload_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/questions/{question_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Delete Question */ - delete: operations['delete_question_tables__table_id__questions__question_id__delete']; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/readiness': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Readiness */ - get: operations['get_readiness_eval_readiness_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/eval/run': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Trigger Eval */ - post: operations['trigger_eval_tables__table_id__eval_run_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/eval/runs': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Runs */ - get: operations['list_runs_tables__table_id__eval_runs_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/runs/all': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get All Eval Runs */ - get: operations['get_all_eval_runs_eval_runs_all_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/batch/{promotion_run_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Batch Runs */ - get: operations['get_batch_runs_eval_batch__promotion_run_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/{run_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Run */ - get: operations['get_run_eval__run_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/{run_id}/results': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Results */ - get: operations['get_results_eval__run_id__results_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/{run_id}/report': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Run Report */ - get: operations['get_run_report_eval__run_id__report_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/eval/{run_id}/regression-diff': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Regression Diff - * @description For a promotion-regression run, return questions that passed the baseline - * but failed in the regression — true regressions introduced by the new candidate table. - */ - get: operations['get_regression_diff_eval__run_id__regression_diff_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/run': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Trigger Evaluation Run - * @description Trigger evaluation for one or more tables. - */ - post: operations['trigger_evaluation_run_evaluations_run_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/runs': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Runs */ - get: operations['list_runs_evaluations_runs_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/runs/{run_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Run */ - get: operations['get_run_evaluations_runs__run_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/runs/{run_id}/report': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Run Report - * @description Full structured report — matches the evaluation_pipeline.md format. - */ - get: operations['get_run_report_evaluations_runs__run_id__report_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/schedules': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Schedules */ - get: operations['list_schedules_evaluations_schedules_get']; - put?: never; - /** Create Schedule */ - post: operations['create_schedule_evaluations_schedules_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/schedules/{schedule_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** Update Schedule */ - put: operations['update_schedule_evaluations_schedules__schedule_id__put']; - post?: never; - /** Delete Schedule */ - delete: operations['delete_schedule_evaluations_schedules__schedule_id__delete']; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/analytics/trends': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Trends - * @description Score and pass_rate over time. Returns one data point per completed run. - */ - get: operations['get_trends_evaluations_analytics_trends_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/analytics/tables': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Table Analytics - * @description Per-table performance ranking. - */ - get: operations['get_table_analytics_evaluations_analytics_tables_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/compare': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Compare Runs - * @description Side-by-side comparison of two eval runs. - */ - get: operations['compare_runs_evaluations_compare_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/alerts': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Alerts */ - get: operations['list_alerts_evaluations_alerts_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/alerts/{alert_id}/acknowledge': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Acknowledge Alert */ - post: operations['acknowledge_alert_evaluations_alerts__alert_id__acknowledge_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/evaluations/system-health': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * System Health - * @description Aggregate system health for the control center dashboard. - */ - get: operations['system_health_evaluations_system_health_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/publish': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Publish Table */ - post: operations['publish_table_tables__table_id__publish_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/scopes': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Scopes */ - get: operations['list_scopes_scopes_get']; - put?: never; - /** Create Scope */ - post: operations['create_scope_scopes_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/scopes/{scope_id}/activate': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Activate Scope */ - post: operations['activate_scope_scopes__scope_id__activate_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/audit/queries': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** List Audit Queries */ - get: operations['list_audit_queries_audit_queries_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/profile': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Table Profile */ - get: operations['get_table_profile_tables__table_id__profile_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/all/profile/run': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Run All Profiles - * @description Triggers profiling for all registered tables. - * Ideal for Airflow DAGs to keep profiles up-to-date. - */ - post: operations['run_all_profiles_tables_all_profile_run_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/profile/run': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Run Table Profile - * @description Trigger a new profiling run against Trino. - * Returns immediately (202) while profiling runs in the background. - * Respects a 24h cache unless force=True. - */ - post: operations['run_table_profile_tables__table_id__profile_run_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/profile/columns': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Column Profiles */ - get: operations['get_column_profiles_tables__table_id__profile_columns_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/columns/{column}/profile': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Single Column Profile */ - get: operations['get_single_column_profile_tables__table_id__columns__column__profile_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/profile/context': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Profile Context - * @description Returns a compact, LLM-ready context blob built from the latest - * completed profile. Used by the TextToSQL context builder for - * system-prompt injection, enrichment suggestions, and join suggestions. - */ - get: operations['get_profile_context_tables__table_id__profile_context_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/cross-profile': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Cross Profiles */ - get: operations['get_cross_profiles_tables__table_id__cross_profile_get']; - put?: never; - /** - * Cross Profile - * @description Discover cross-table join suggestions based on profiling statistics. - */ - post: operations['cross_profile_tables__table_id__cross_profile_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/feedback': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Submit Feedback */ - post: operations['submit_feedback_feedback_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/feedback/table/{table_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Table Feedback */ - get: operations['get_table_feedback_feedback_table__table_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/feedback/query/{query_id}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Query Feedback */ - get: operations['get_query_feedback_feedback_query__query_id__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/admin/tables/pending': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Pending Tables - * @description Get all tables in 'verified' status (awaiting admin approval). - */ - get: operations['get_pending_tables_admin_tables_pending_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/admin/tables/{table_id}/approve': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Approve Table - * @description Approve a verified table for production. - * - * Actions: - * 1. Set table.status = production - * 2. Sync its golden questions to the shared 'text2sql_production' Langfuse dataset - */ - post: operations['approve_table_admin_tables__table_id__approve_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/admin/tables/{table_id}/reject': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Reject Table - * @description Reject a verified table, returning it to sandbox. - */ - post: operations['reject_table_admin_tables__table_id__reject_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/health': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Table Health */ - get: operations['get_table_health_tables__table_id__health_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/tables/{table_id}/health/recompute': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Recompute Health */ - post: operations['recompute_health_tables__table_id__health_recompute_post']; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/health/all': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get All Health - * @description Returns the latest health record for every table (used in the table list view). - */ - get: operations['get_all_health_health_all_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/api/v1/auth/config': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Auth Config */ - get: operations['get_auth_config_api_v1_auth_config_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/api/v1/auth/login/{provider}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Login */ - get: operations['login_api_v1_auth_login__provider__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/api/v1/auth/callback/{provider}': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Auth Callback */ - get: operations['auth_callback_api_v1_auth_callback__provider__get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/api/v1/auth/logout': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Logout */ - get: operations['logout_api_v1_auth_logout_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/api/v1/auth/me': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get Me */ - get: operations['get_me_api_v1_auth_me_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - '/health': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Health Check */ - get: operations['health_check_health_get']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; + "/api/tables/{table_id}/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Table Health */ + get: operations["get_table_health_api_tables__table_id__health_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/health/recompute": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Recompute Health */ + post: operations["recompute_health_api_tables__table_id__health_recompute_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/health/all": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get All Health + * @description Returns the latest health record for every table (used in the table list view). + */ + get: operations["get_all_health_api_health_all_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/health/esca": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Esca Health */ + get: operations["get_esca_health_api_health_esca_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/admin/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Login + * @description Validate that the supplied email belongs to an active admin in security.users. + * Returns the user record on success; raises 403 when the user is not an admin. + */ + post: operations["login_api_admin_login_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/admin/tables/pending": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Pending Tables + * @description Get all tables in 'verified' status (awaiting admin approval). + */ + get: operations["get_pending_tables_api_admin_tables_pending_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/admin/tables/{table_id}/approve": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Approve Table + * @description Approve a verified table for production. + * + * Actions: + * 1. Set table.status = production + * 2. Sync its golden questions to the shared 'text2sql_production' Langfuse dataset + */ + post: operations["approve_table_api_admin_tables__table_id__approve_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/admin/tables/{table_id}/reject": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Reject Table + * @description Reject a verified table, returning it to sandbox. + */ + post: operations["reject_table_api_admin_tables__table_id__reject_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/agent/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Chat + * @description Start a new agent session or resume an interrupted one. + * + * - First call: provide `query` (and optionally `allowed_tables`, `allowed_statuses`, `extractors`). + * - Resume call: provide `thread_id` + `resume_value` (`{"approved": true}` or + * `{"approved": false, "feedback": "..."}`). + * + * The backend forwards the request to the agent MCP service and returns the + * structured result. The frontend only deals with this endpoint. + */ + post: operations["chat_api_agent_chat_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/agent/stream/{thread_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Stream Agent Execution + * @description Subscribe to Redis PubSub for agent graph execution events and yield them as SSE. + */ + get: operations["stream_agent_execution_api_agent_stream__thread_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/agent/traces/{trace_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Trace Timeline + * @description Fetch trace from Langfuse and normalize observations for frontend timeline. + */ + get: operations["get_trace_timeline_api_agent_traces__trace_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/agent/suggest_fixes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Suggest Fixes + * @description Generate quick fixes during HITL interruption via MCP. + */ + post: operations["suggest_fixes_api_agent_suggest_fixes_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/auth/login/{provider}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Login */ + get: operations["login_api_v1_auth_login__provider__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/auth/callback/{provider}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Auth Callback */ + get: operations["auth_callback_api_v1_auth_callback__provider__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/auth/logout": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Logout */ + get: operations["logout_api_v1_auth_logout_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/auth/config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Auth Config */ + get: operations["get_auth_config_api_v1_auth_config_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/auth/me": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Me */ + get: operations["get_me_api_v1_auth_me_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Tables */ + get: operations["list_tables_api_tables_get"]; + put?: never; + /** Create Table */ + post: operations["create_table_api_tables_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Table */ + get: operations["get_table_api_tables__table_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/sync-schema": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Sync Table Schema */ + post: operations["sync_table_schema_api_tables__table_id__sync_schema_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + /** + * Update Table Status + * @description Update a table's status. + */ + patch: operations["update_table_status_api_tables__table_id__status_patch"]; + trace?: never; + }; + "/api/tables/{table_id}/foreign-keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Foreign Keys + * @description Get all custom foreign key mappings for a table. + */ + get: operations["get_foreign_keys_api_tables__table_id__foreign_keys_get"]; + put?: never; + /** + * Create Foreign Key + * @description Create or update a foreign key mapping for a specific column in the table. + */ + post: operations["create_foreign_key_api_tables__table_id__foreign_keys_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/foreign-keys/{fk_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete Foreign Key + * @description Delete a specific foreign key mapping. + */ + delete: operations["delete_foreign_key_api_tables__table_id__foreign_keys__fk_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/enrichment": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Enrichment + * @description Save a new enrichment version for a table. + * + * If the table is currently in 'production' and the new enrichment + * changes the table_description or schema fields, the table is + * automatically moved to 'degraded'. + * + * This forces a full re-evaluation cycle before the table can be + * promoted to production again. + */ + post: operations["create_enrichment_api_tables__table_id__enrichment_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/enrichment/latest": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Latest Enrichment */ + get: operations["get_latest_enrichment_api_tables__table_id__enrichment_latest_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/questions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Questions */ + get: operations["list_questions_api_tables__table_id__questions_get"]; + put?: never; + /** Create Question */ + post: operations["create_question_api_tables__table_id__questions_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/questions/upload": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Upload Questions */ + post: operations["upload_questions_api_tables__table_id__questions_upload_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/questions/{question_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Delete Question */ + delete: operations["delete_question_api_tables__table_id__questions__question_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/readiness": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Readiness */ + get: operations["get_readiness_api_eval_readiness_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/eval/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Trigger Eval */ + post: operations["trigger_eval_api_tables__table_id__eval_run_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/eval/runs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Runs */ + get: operations["list_runs_api_tables__table_id__eval_runs_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/runs/all": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get All Eval Runs */ + get: operations["get_all_eval_runs_api_eval_runs_all_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/batch/{promotion_run_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Batch Runs */ + get: operations["get_batch_runs_api_eval_batch__promotion_run_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/{run_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Run */ + get: operations["get_run_api_eval__run_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/{run_id}/results": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Results */ + get: operations["get_results_api_eval__run_id__results_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/{run_id}/report": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Run Report */ + get: operations["get_run_report_api_eval__run_id__report_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/eval/{run_id}/regression-diff": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Regression Diff + * @description For a promotion-regression run, return questions that passed the baseline + * but failed in the regression — true regressions introduced by the new candidate table. + */ + get: operations["get_regression_diff_api_eval__run_id__regression_diff_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/extractors": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Extractors + * @description List all registered HTTP extractors. + */ + get: operations["list_extractors_api_extractors_get"]; + put?: never; + /** + * Create Extractor + * @description Register a new HTTP extractor. + */ + post: operations["create_extractor_api_extractors_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/extractors/{extractor_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete Extractor + * @description Delete an HTTP extractor by ID. + */ + delete: operations["delete_extractor_api_extractors__extractor_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Trigger Evaluation Run + * @description Trigger evaluation for one or more tables. + */ + post: operations["trigger_evaluation_run_api_evaluations_run_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/runs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Runs */ + get: operations["list_runs_api_evaluations_runs_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/runs/{run_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Run */ + get: operations["get_run_api_evaluations_runs__run_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/runs/{run_id}/report": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Run Report + * @description Full structured report — matches the evaluation_pipeline.md format. + */ + get: operations["get_run_report_api_evaluations_runs__run_id__report_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/schedules": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Schedules */ + get: operations["list_schedules_api_evaluations_schedules_get"]; + put?: never; + /** Create Schedule */ + post: operations["create_schedule_api_evaluations_schedules_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/schedules/{schedule_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** Update Schedule */ + put: operations["update_schedule_api_evaluations_schedules__schedule_id__put"]; + post?: never; + /** Delete Schedule */ + delete: operations["delete_schedule_api_evaluations_schedules__schedule_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/analytics/trends": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Trends + * @description Score and pass_rate over time. Returns one data point per completed run. + */ + get: operations["get_trends_api_evaluations_analytics_trends_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/analytics/tables": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Table Analytics + * @description Per-table performance ranking. + */ + get: operations["get_table_analytics_api_evaluations_analytics_tables_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/compare": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Compare Runs + * @description Side-by-side comparison of two eval runs. + */ + get: operations["compare_runs_api_evaluations_compare_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/alerts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Alerts */ + get: operations["list_alerts_api_evaluations_alerts_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/alerts/{alert_id}/acknowledge": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Acknowledge Alert */ + post: operations["acknowledge_alert_api_evaluations_alerts__alert_id__acknowledge_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/evaluations/system-health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * System Health + * @description Aggregate system health for the control center dashboard. + */ + get: operations["system_health_api_evaluations_system_health_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/publish": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Publish Table */ + post: operations["publish_table_api_tables__table_id__publish_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/scopes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Scopes */ + get: operations["list_scopes_api_scopes_get"]; + put?: never; + /** Create Scope */ + post: operations["create_scope_api_scopes_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/scopes/{scope_id}/activate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Activate Scope */ + post: operations["activate_scope_api_scopes__scope_id__activate_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/audit/queries": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** List Audit Queries */ + get: operations["list_audit_queries_api_audit_queries_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Table Profile */ + get: operations["get_table_profile_api_tables__table_id__profile_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/all/profile/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Run All Profiles + * @description Triggers profiling for all registered tables. + * Ideal for Airflow DAGs to keep profiles up-to-date. + */ + post: operations["run_all_profiles_api_tables_all_profile_run_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/profile/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Run Table Profile + * @description Trigger a new profiling run against Trino. + * Returns immediately (202) while profiling runs in the background. + * Respects a 24h cache unless force=True. + */ + post: operations["run_table_profile_api_tables__table_id__profile_run_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/profile/columns": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Column Profiles */ + get: operations["get_column_profiles_api_tables__table_id__profile_columns_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/columns/{column}/profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Single Column Profile */ + get: operations["get_single_column_profile_api_tables__table_id__columns__column__profile_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/profile/context": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Profile Context + * @description Returns a compact, LLM-ready context blob built from the latest + * completed profile. Used by the TextToSQL context builder for + * system-prompt injection, enrichment suggestions, and join suggestions. + */ + get: operations["get_profile_context_api_tables__table_id__profile_context_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/tables/{table_id}/cross-profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Cross Profiles */ + get: operations["get_cross_profiles_api_tables__table_id__cross_profile_get"]; + put?: never; + /** + * Cross Profile + * @description Discover cross-table join suggestions based on profiling statistics. + */ + post: operations["cross_profile_api_tables__table_id__cross_profile_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/feedback": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Submit Feedback */ + post: operations["submit_feedback_api_feedback_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/feedback/table/{table_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Table Feedback */ + get: operations["get_table_feedback_api_feedback_table__table_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/feedback/query/{query_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Query Feedback */ + get: operations["get_query_feedback_api_feedback_query__query_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Health Check */ + get: operations["health_check_health_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - /** - * AlertSeverity - * @enum {string} - */ - AlertSeverity: 'info' | 'warning' | 'critical'; - /** AuditQueryRead */ - AuditQueryRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string | null; - /** User Id */ - user_id: string; - /** Session Id */ - session_id: string | null; - /** Raw Question */ - raw_question: string; - /** Normalized Question */ - normalized_question: string | null; - /** Tables Accessed */ - tables_accessed: string[] | null; - /** Final Sql */ - final_sql: string | null; - /** Result Row Count */ - result_row_count: number | null; - /** Result Columns */ - result_columns: string[] | null; - /** Execution Time Ms */ - execution_time_ms: number | null; - /** Refiner Iterations */ - refiner_iterations: number | null; - /** Status */ - status: string; - /** Error Message */ - error_message: string | null; - /** Langfuse Trace Id */ - langfuse_trace_id: string | null; - /** Confidence Score */ - confidence_score: number | null; - /** Explanation Text */ - explanation_text: string | null; - /** Warnings Json */ - warnings_json: string[] | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** AuthConfigRead */ - AuthConfigRead: { - /** Enable Keycloak */ - ENABLE_KEYCLOAK: boolean; - /** Enable Google */ - ENABLE_GOOGLE: boolean; - }; - /** Body_upload_questions_tables__table_id__questions_upload_post */ - Body_upload_questions_tables__table_id__questions_upload_post: { - /** - * File - * Format: binary - */ - file: string; - }; - /** ColumnProfileRead */ - ColumnProfileRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Profile Id */ - profile_id: string; - /** Column Name */ - column_name: string; - /** Data Type */ - data_type: string | null; - /** Null Count */ - null_count: number | null; - /** Null Rate */ - null_rate: number | null; - /** Distinct Count */ - distinct_count: number | null; - /** Min Value */ - min_value: string | null; - /** Max Value */ - max_value: string | null; - /** Avg Value */ - avg_value: number | null; - /** Median Value */ - median_value: number | null; - /** Top Values */ - top_values: unknown | null; - /** Is Categorical */ - is_categorical: boolean; - /** Is Geo */ - is_geo: boolean; - /** Is Time */ - is_time: boolean; - /** Semantic Type */ - semantic_type: string | null; - /** Stats Json */ - stats_json: unknown | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** CrossTableProfileRead */ - CrossTableProfileRead: { - /** Id */ - id: string; - /** Source Table Id */ - source_table_id: string; - /** Target Table Id */ - target_table_id: string; - /** Join Suggestion */ - join_suggestion: string | null; - /** Match Strength */ - match_strength: string; - /** Common Columns */ - common_columns: string[] | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * DifficultyLevel - * @enum {string} - */ - DifficultyLevel: 'simple' | 'medium' | 'complex'; - /** EnrichmentCreate */ - EnrichmentCreate: { - /** Data */ - data: Record; - }; - /** EnrichmentRead */ - EnrichmentRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Version */ - version: number; - /** Data */ - data: Record | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** EvalResultRead */ - EvalResultRead: { - /** Id */ - id: string; - /** Run Id */ - run_id: string; - /** Question Id */ - question_id: string; - /** Score */ - score: number; - /** Status */ - status: string; - /** Error Type */ - error_type: string | null; - }; - /** EvalRunRead */ - EvalRunRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string | null; - /** Table Name */ - table_name: string; - /** Dataset Id */ - dataset_id: string | null; - /** Score */ - score: number; - /** Pass Rate */ - pass_rate: number; - /** Fail Rate */ - fail_rate: number; - /** Total Questions */ - total_questions: number; - /** Duration Seconds */ - duration_seconds: number | null; - /** Triggered By */ - triggered_by: string; - status: components['schemas']['EvalStatus']; - /** - * Started At - * Format: date-time - */ - started_at: string; - /** Completed At */ - completed_at: string | null; - /** Failure Breakdown */ - failure_breakdown: Record | null; - /** Dimension Averages */ - dimension_averages: Record | null; - /** Regression Detected */ - regression_detected: boolean; - /** Regression Delta */ - regression_delta: number | null; - /** Promotion Run Id */ - promotion_run_id?: string | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * EvalStatus - * @enum {string} - */ - EvalStatus: 'running' | 'completed' | 'failed'; - /** EvaluationAlertRead */ - EvaluationAlertRead: { - /** Id */ - id: string; - /** Run Id */ - run_id: string | null; - /** Table Id */ - table_id: string | null; - /** Alert Type */ - alert_type: string; - severity: components['schemas']['AlertSeverity']; - /** Message */ - message: string; - /** Details */ - details: Record | null; - /** Acknowledged */ - acknowledged: boolean; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** EvaluationScheduleCreate */ - EvaluationScheduleCreate: { - /** Dataset Id */ - dataset_id: string; - /** Table Scope */ - table_scope?: string[] | null; - /** - * Cron Expression - * @default 0 2 * * * - */ - cron_expression: string; - /** - * Enabled - * @default true - */ - enabled: boolean; - /** - * Created By - * @default user - */ - created_by: string; - }; - /** EvaluationScheduleRead */ - EvaluationScheduleRead: { - /** Id */ - id: string; - /** Dataset Id */ - dataset_id: string; - /** Table Scope */ - table_scope: string[] | null; - /** Cron Expression */ - cron_expression: string; - /** Enabled */ - enabled: boolean; - /** Created By */ - created_by: string; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** Last Run At */ - last_run_at: string | null; - /** Next Run At */ - next_run_at: string | null; - }; - /** EvaluationScheduleUpdate */ - EvaluationScheduleUpdate: { - /** Dataset Id */ - dataset_id?: string | null; - /** Table Scope */ - table_scope?: string[] | null; - /** Cron Expression */ - cron_expression?: string | null; - /** Enabled */ - enabled?: boolean | null; - }; - /** - * FeedbackRating - * @enum {string} - */ - FeedbackRating: 'positive' | 'negative'; - /** ForeignKeyMappingCreate */ - ForeignKeyMappingCreate: { - /** Source Column */ - source_column: string; - /** Target Table Id */ - target_table_id: string; - /** Target Column */ - target_column: string; - }; - /** ForeignKeyMappingRead */ - ForeignKeyMappingRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Source Column */ - source_column: string; - /** Target Table Id */ - target_table_id: string; - /** Target Column */ - target_column: string; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** - * Updated At - * Format: date-time - */ - updated_at: string; - }; - /** GoldenQuestionCreate */ - GoldenQuestionCreate: { - /** Question */ - question: string; - /** Expected Sql */ - expected_sql: string; - /** @default simple */ - difficulty: components['schemas']['DifficultyLevel']; - /** @default simple */ - question_type: components['schemas']['QuestionType']; - /** Coverage Tags */ - coverage_tags?: string[] | null; - }; - /** GoldenQuestionRead */ - GoldenQuestionRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Question */ - question: string; - /** Expected Sql */ - expected_sql: string; - difficulty: components['schemas']['DifficultyLevel']; - question_type: components['schemas']['QuestionType']; - /** Coverage Tags */ - coverage_tags: string[] | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** HTTPValidationError */ - HTTPValidationError: { - /** Detail */ - detail?: components['schemas']['ValidationError'][]; - }; - /** - * HealthStatus - * @enum {string} - */ - HealthStatus: 'good' | 'warning' | 'critical'; - /** - * ProfilingStatus - * @enum {string} - */ - ProfilingStatus: 'pending' | 'running' | 'completed' | 'failed'; - /** QueryFeedbackCreate */ - QueryFeedbackCreate: { - /** User Id */ - user_id: string; - /** Query Id */ - query_id: string; - /** Table Id */ - table_id?: string | null; - rating: components['schemas']['FeedbackRating']; - /** Comment */ - comment?: string | null; - /** Suggested Correction */ - suggested_correction?: string | null; - }; - /** QueryFeedbackRead */ - QueryFeedbackRead: { - /** Id */ - id: string; - /** User Id */ - user_id: string; - /** Query Id */ - query_id: string; - /** Table Id */ - table_id: string | null; - rating: components['schemas']['FeedbackRating']; - /** Comment */ - comment: string | null; - /** Suggested Correction */ - suggested_correction: string | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * QuestionType - * @enum {string} - */ - QuestionType: 'simple' | 'complex' | 'join' | 'geo' | 'aggregate' | 'time_series'; - /** RejectionNote */ - RejectionNote: { - /** Note */ - note: string; - }; - /** SecurityUserRead */ - SecurityUserRead: { - /** Id */ - id: string; - /** Email */ - email: string; - /** Name */ - name: string; - /** Is Active */ - is_active: boolean; - /** Is Admin */ - is_admin: boolean; - /** Provider */ - provider: string | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** - * Updated At - * Format: date-time - */ - updated_at: string; - }; - /** TableCreate */ - TableCreate: { - /** Oasis Source Id */ - oasis_source_id: string; - }; - /** TableHealthRead */ - TableHealthRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Health Score */ - health_score: number; - health_status: components['schemas']['HealthStatus']; - /** Eval Success Rate */ - eval_success_rate: number | null; - /** Feedback Ratio */ - feedback_ratio: number | null; - /** Data Quality Score */ - data_quality_score: number | null; - /** Schema Drift Flag */ - schema_drift_flag: boolean; - /** Failure Wrong Table */ - failure_wrong_table: number; - /** Failure Wrong Sql */ - failure_wrong_sql: number; - /** Failure Empty Result */ - failure_empty_result: number; - /** Failure Execution Error */ - failure_execution_error: number; - /** - * Updated At - * Format: date-time - */ - updated_at: string; - }; - /** TableProfileRead */ - TableProfileRead: { - /** Id */ - id: string; - /** Table Id */ - table_id: string; - /** Version */ - version: number; - status: components['schemas']['ProfilingStatus']; - /** Row Count */ - row_count: number | null; - /** Sample Size */ - sample_size: number | null; - /** Column Count */ - column_count: number | null; - /** Size Bytes */ - size_bytes: number | null; - /** Null Rate Avg */ - null_rate_avg: number | null; - /** Duplicate Rate */ - duplicate_rate: number | null; - /** Sample Data */ - sample_data: unknown | null; - /** Auto Insights */ - auto_insights: string[] | null; - /** Profile Json */ - profile_json: unknown | null; - /** Cached Until */ - cached_until: string | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** - * Updated At - * Format: date-time - */ - updated_at: string; - }; - /** TableRead */ - TableRead: { - /** Id */ - id: string; - /** Name */ - name: string; - /** Schema Name */ - schema_name: string; - status: components['schemas']['TableStatus']; - /** Owner Id */ - owner_id: string; - /** Oasis Source Id */ - oasis_source_id: string; - /** Catalog */ - catalog: string; - /** Service */ - service: string; - /** Openmetadata Json */ - openmetadata_json: Record | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** - * Updated At - * Format: date-time - */ - updated_at: string; - }; - /** - * TableStatus - * @enum {string} - */ - TableStatus: 'draft' | 'sandbox' | 'verified' | 'production' | 'degraded'; - /** UserScopeCreate */ - UserScopeCreate: { - /** User Id */ - user_id: string; - /** Name */ - name: string; - }; - /** UserScopeRead */ - UserScopeRead: { - /** Id */ - id: string; - /** User Id */ - user_id: string; - /** Name */ - name: string; - /** Is Active */ - is_active: boolean; - }; - /** ValidationError */ - ValidationError: { - /** Location */ - loc: (string | number)[]; - /** Message */ - msg: string; - /** Error Type */ - type: string; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** + * AlertSeverity + * @enum {string} + */ + AlertSeverity: "info" | "warning" | "critical"; + /** AuditQueryRead */ + AuditQueryRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string | null; + /** User Id */ + user_id: string; + /** Session Id */ + session_id: string | null; + /** Raw Question */ + raw_question: string; + /** Normalized Question */ + normalized_question: string | null; + /** Tables Accessed */ + tables_accessed: string[] | null; + /** Final Sql */ + final_sql: string | null; + /** Result Row Count */ + result_row_count: number | null; + /** Result Columns */ + result_columns: string[] | null; + /** Execution Time Ms */ + execution_time_ms: number | null; + /** Refiner Iterations */ + refiner_iterations: number | null; + /** Status */ + status: string; + /** Error Message */ + error_message: string | null; + /** Langfuse Trace Id */ + langfuse_trace_id: string | null; + /** Confidence Score */ + confidence_score: number | null; + /** Explanation Text */ + explanation_text: string | null; + /** Warnings Json */ + warnings_json: string[] | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** AuthConfigRead */ + AuthConfigRead: { + /** Enable Keycloak */ + ENABLE_KEYCLOAK: boolean; + /** Enable Google */ + ENABLE_GOOGLE: boolean; + }; + /** Body_upload_questions_api_tables__table_id__questions_upload_post */ + Body_upload_questions_api_tables__table_id__questions_upload_post: { + /** + * File + * Format: binary + */ + file: string; + }; + /** ChatRequest */ + ChatRequest: { + /** Query */ + query?: string | null; + /** Thread Id */ + thread_id?: string | null; + /** Resume Value */ + resume_value?: components["schemas"]["QueryApproval"] | string | Record | null; + /** Allowed Tables */ + allowed_tables?: string[] | null; + /** Allowed Statuses */ + allowed_statuses?: string[] | null; + /** Extractors */ + extractors?: string[] | null; + /** Active Skills */ + active_skills?: string[] | null; + /** Execution Mode */ + execution_mode?: string | null; + /** + * Hitl Enabled + * @default true + */ + hitl_enabled: boolean; + }; + /** ChatResponse */ + ChatResponse: { + /** Thread Id */ + thread_id: string; + /** Status */ + status: string; + /** Interrupt Details */ + interrupt_details?: Record | null; + /** Summary */ + summary?: string | null; + /** Raw Data Ref */ + raw_data_ref?: string | null; + /** Sql Query */ + sql_query?: string | null; + /** Sql Explanation */ + sql_explanation?: string | null; + /** Schema Plan */ + schema_plan?: string | null; + /** Trace Id */ + trace_id?: string | null; + /** Execution Path */ + execution_path?: string[] | null; + }; + /** ColumnProfileRead */ + ColumnProfileRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + /** Profile Id */ + profile_id: string; + /** Column Name */ + column_name: string; + /** Data Type */ + data_type: string | null; + /** Null Count */ + null_count: number | null; + /** Null Rate */ + null_rate: number | null; + /** Distinct Count */ + distinct_count: number | null; + /** Min Value */ + min_value: string | null; + /** Max Value */ + max_value: string | null; + /** Avg Value */ + avg_value: number | null; + /** Median Value */ + median_value: number | null; + /** Top Values */ + top_values: unknown | null; + /** Is Categorical */ + is_categorical: boolean; + /** Is Geo */ + is_geo: boolean; + /** Is Time */ + is_time: boolean; + /** Semantic Type */ + semantic_type: string | null; + /** Stats Json */ + stats_json: unknown | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** CrossTableProfileRead */ + CrossTableProfileRead: { + /** Id */ + id: string; + /** Source Table Id */ + source_table_id: string; + /** Target Table Id */ + target_table_id: string; + /** Join Suggestion */ + join_suggestion: string | null; + /** Match Strength */ + match_strength: string; + /** Common Columns */ + common_columns: string[] | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * DifficultyLevel + * @enum {string} + */ + DifficultyLevel: "simple" | "medium" | "complex"; + /** EnrichmentCreate */ + EnrichmentCreate: { + /** Data */ + data: Record; + }; + /** EnrichmentRead */ + EnrichmentRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + /** Version */ + version: number; + /** Data */ + data: Record | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** EvalResultRead */ + EvalResultRead: { + /** Id */ + id: string; + /** Run Id */ + run_id: string; + /** Question Id */ + question_id: string; + /** Score */ + score: number; + /** Status */ + status: string; + /** Error Type */ + error_type: string | null; + }; + /** EvalRunRead */ + EvalRunRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string | null; + /** Table Name */ + table_name: string; + /** Dataset Id */ + dataset_id: string | null; + /** Score */ + score: number; + /** Pass Rate */ + pass_rate: number; + /** Fail Rate */ + fail_rate: number; + /** Total Questions */ + total_questions: number; + /** Duration Seconds */ + duration_seconds: number | null; + /** Triggered By */ + triggered_by: string; + status: components["schemas"]["EvalStatus"]; + /** + * Started At + * Format: date-time + */ + started_at: string; + /** Completed At */ + completed_at: string | null; + /** Failure Breakdown */ + failure_breakdown: Record | null; + /** Dimension Averages */ + dimension_averages: Record | null; + /** Regression Detected */ + regression_detected: boolean; + /** Regression Delta */ + regression_delta: number | null; + /** Promotion Run Id */ + promotion_run_id?: string | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * EvalStatus + * @enum {string} + */ + EvalStatus: "running" | "completed" | "failed"; + /** EvaluationAlertRead */ + EvaluationAlertRead: { + /** Id */ + id: string; + /** Run Id */ + run_id: string | null; + /** Table Id */ + table_id: string | null; + /** Alert Type */ + alert_type: string; + severity: components["schemas"]["AlertSeverity"]; + /** Message */ + message: string; + /** Details */ + details: Record | null; + /** Acknowledged */ + acknowledged: boolean; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** EvaluationScheduleCreate */ + EvaluationScheduleCreate: { + /** Dataset Id */ + dataset_id: string; + /** Table Scope */ + table_scope?: string[] | null; + /** + * Cron Expression + * @default 0 2 * * * + */ + cron_expression: string; + /** + * Enabled + * @default true + */ + enabled: boolean; + /** + * Created By + * @default user + */ + created_by: string; + }; + /** EvaluationScheduleRead */ + EvaluationScheduleRead: { + /** Id */ + id: string; + /** Dataset Id */ + dataset_id: string; + /** Table Scope */ + table_scope: string[] | null; + /** Cron Expression */ + cron_expression: string; + /** Enabled */ + enabled: boolean; + /** Created By */ + created_by: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** Last Run At */ + last_run_at: string | null; + /** Next Run At */ + next_run_at: string | null; + }; + /** EvaluationScheduleUpdate */ + EvaluationScheduleUpdate: { + /** Dataset Id */ + dataset_id?: string | null; + /** Table Scope */ + table_scope?: string[] | null; + /** Cron Expression */ + cron_expression?: string | null; + /** Enabled */ + enabled?: boolean | null; + }; + /** + * ExtractorStatus + * @enum {string} + */ + ExtractorStatus: "draft" | "sandbox" | "verified" | "production" | "degraded"; + /** + * FeedbackRating + * @enum {string} + */ + FeedbackRating: "positive" | "negative"; + /** ForeignKeyMappingCreate */ + ForeignKeyMappingCreate: { + /** Source Column */ + source_column: string; + /** Target Table Id */ + target_table_id: string; + /** Target Column */ + target_column: string; + }; + /** ForeignKeyMappingRead */ + ForeignKeyMappingRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + /** Source Column */ + source_column: string; + /** Target Table Id */ + target_table_id: string; + /** Target Column */ + target_column: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** GoldenQuestionCreate */ + GoldenQuestionCreate: { + /** Question */ + question: string; + /** Expected Sql */ + expected_sql: string; + /** @default simple */ + difficulty: components["schemas"]["DifficultyLevel"]; + /** @default simple */ + question_type: components["schemas"]["QuestionType"]; + /** Coverage Tags */ + coverage_tags?: string[] | null; + }; + /** GoldenQuestionRead */ + GoldenQuestionRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + /** Question */ + question: string; + /** Expected Sql */ + expected_sql: string; + difficulty: components["schemas"]["DifficultyLevel"]; + question_type: components["schemas"]["QuestionType"]; + /** Coverage Tags */ + coverage_tags: string[] | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** HTTPValidationError */ + HTTPValidationError: { + /** Detail */ + detail?: components["schemas"]["ValidationError"][]; + }; + /** + * HealthStatus + * @enum {string} + */ + HealthStatus: "good" | "warning" | "critical"; + /** HttpExtractorCreate */ + HttpExtractorCreate: { + /** Name */ + name: string; + /** Url */ + url: string; + /** Description */ + description?: string | null; + /** @default draft */ + status: components["schemas"]["ExtractorStatus"]; + }; + /** HttpExtractorRead */ + HttpExtractorRead: { + /** Id */ + id: string; + /** Name */ + name: string; + /** Url */ + url: string; + /** Description */ + description: string | null; + status: components["schemas"]["ExtractorStatus"]; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** LoginRequest */ + LoginRequest: { + /** Email */ + email: string; + }; + /** + * ProfilingStatus + * @enum {string} + */ + ProfilingStatus: "pending" | "running" | "completed" | "failed"; + /** QueryApproval */ + QueryApproval: { + /** Approved */ + approved: boolean; + /** Feedback */ + feedback?: string | null; + /** Rejection Category */ + rejection_category?: string | null; + /** Suggested Fix */ + suggested_fix?: string | null; + }; + /** QueryFeedbackCreate */ + QueryFeedbackCreate: { + /** User Id */ + user_id: string; + /** Query Id */ + query_id: string; + /** Table Id */ + table_id?: string | null; + rating: components["schemas"]["FeedbackRating"]; + /** Comment */ + comment?: string | null; + /** Suggested Correction */ + suggested_correction?: string | null; + }; + /** QueryFeedbackRead */ + QueryFeedbackRead: { + /** Id */ + id: string; + /** User Id */ + user_id: string; + /** Query Id */ + query_id: string; + /** Table Id */ + table_id: string | null; + rating: components["schemas"]["FeedbackRating"]; + /** Comment */ + comment: string | null; + /** Suggested Correction */ + suggested_correction: string | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * QuestionType + * @enum {string} + */ + QuestionType: "simple" | "complex" | "join" | "geo" | "aggregate" | "time_series"; + /** RejectionNote */ + RejectionNote: { + /** Note */ + note: string; + }; + /** SecurityUserRead */ + SecurityUserRead: { + /** Id */ + id: string; + /** Email */ + email: string; + /** Name */ + name: string; + /** Is Active */ + is_active: boolean; + /** Is Admin */ + is_admin: boolean; + /** Provider */ + provider: string | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** SuggestFixesRequest */ + SuggestFixesRequest: { + /** Thread Id */ + thread_id: string; + /** Category */ + category: string; + }; + /** TableCreate */ + TableCreate: { + /** Oasis Source Id */ + oasis_source_id: string; + }; + /** TableHealthRead */ + TableHealthRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + /** Health Score */ + health_score: number; + health_status: components["schemas"]["HealthStatus"]; + /** Eval Success Rate */ + eval_success_rate: number | null; + /** Feedback Ratio */ + feedback_ratio: number | null; + /** Data Quality Score */ + data_quality_score: number | null; + /** Schema Drift Flag */ + schema_drift_flag: boolean; + /** Failure Wrong Table */ + failure_wrong_table: number; + /** Failure Wrong Sql */ + failure_wrong_sql: number; + /** Failure Empty Result */ + failure_empty_result: number; + /** Failure Execution Error */ + failure_execution_error: number; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** TableProfileRead */ + TableProfileRead: { + /** Id */ + id: string; + /** Table Id */ + table_id: string; + status: components["schemas"]["ProfilingStatus"]; + /** Row Count */ + row_count: number | null; + /** Sample Size */ + sample_size: number | null; + /** Column Count */ + column_count: number | null; + /** Size Bytes */ + size_bytes: number | null; + /** Null Rate Avg */ + null_rate_avg: number | null; + /** Duplicate Rate */ + duplicate_rate: number | null; + /** Sample Data */ + sample_data: unknown | null; + /** Auto Insights */ + auto_insights: string[] | null; + /** Profile Json */ + profile_json: unknown | null; + /** Cached Until */ + cached_until: string | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** TableRead */ + TableRead: { + /** Id */ + id: string; + /** Name */ + name: string; + /** Schema Name */ + schema_name: string; + status: components["schemas"]["TableStatus"]; + /** Owner Id */ + owner_id: string; + /** Oasis Source Id */ + oasis_source_id: string; + /** Catalog */ + catalog: string; + /** Service */ + service: string; + /** Openmetadata Json */ + openmetadata_json: Record | null; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + }; + /** + * TableStatus + * @enum {string} + */ + TableStatus: "draft" | "sandbox" | "verified" | "production" | "degraded"; + /** TraceSpan */ + TraceSpan: { + /** Span Name */ + span_name: string; + /** Start Time */ + start_time?: string | null; + /** + * Duration Ms + * @default 0 + */ + duration_ms: number; + /** + * Input Tokens + * @default 0 + */ + input_tokens: number; + /** + * Output Tokens + * @default 0 + */ + output_tokens: number; + /** + * Model + * @default N/A + */ + model: string; + /** Status */ + status: string; + /** + * Input Preview + * @default + */ + input_preview: string; + /** + * Output Preview + * @default + */ + output_preview: string; + }; + /** UserScopeCreate */ + UserScopeCreate: { + /** User Id */ + user_id: string; + /** Name */ + name: string; + }; + /** UserScopeRead */ + UserScopeRead: { + /** Id */ + id: string; + /** User Id */ + user_id: string; + /** Name */ + name: string; + /** Is Active */ + is_active: boolean; + }; + /** ValidationError */ + ValidationError: { + /** Location */ + loc: (string | number)[]; + /** Message */ + msg: string; + /** Error Type */ + type: string; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export interface operations { - list_tables_tables_get: { - parameters: { - query?: { - status?: components['schemas']['TableStatus'] | null; - owner_id?: string | null; - search?: string | null; - }; - header?: { - 'x-scope-id'?: string | null; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - create_table_tables_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['TableCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_table_tables__table_id__get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - sync_table_schema_tables__table_id__sync_schema_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - update_table_status_tables__table_id__status_patch: { - parameters: { - query: { - status: components['schemas']['TableStatus']; - }; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_foreign_keys_tables__table_id__foreign_keys_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['ForeignKeyMappingRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - create_foreign_key_tables__table_id__foreign_keys_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['ForeignKeyMappingCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['ForeignKeyMappingRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - delete_foreign_key_tables__table_id__foreign_keys__fk_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - fk_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - create_enrichment_tables__table_id__enrichment_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['EnrichmentCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EnrichmentRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_latest_enrichment_tables__table_id__enrichment_latest_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EnrichmentRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_questions_tables__table_id__questions_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['GoldenQuestionRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - create_question_tables__table_id__questions_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['GoldenQuestionCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['GoldenQuestionRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - upload_questions_tables__table_id__questions_upload_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'multipart/form-data': components['schemas']['Body_upload_questions_tables__table_id__questions_upload_post']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - delete_question_tables__table_id__questions__question_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - question_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_readiness_eval_readiness_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - }; - }; - trigger_eval_tables__table_id__eval_run_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_runs_tables__table_id__eval_runs_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_all_eval_runs_eval_runs_all_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead'][]; - }; - }; - }; - }; - get_batch_runs_eval_batch__promotion_run_id__get: { - parameters: { - query?: never; - header?: never; - path: { - promotion_run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_run_eval__run_id__get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_results_eval__run_id__results_get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalResultRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_run_report_eval__run_id__report_get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_regression_diff_eval__run_id__regression_diff_get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - trigger_evaluation_run_evaluations_run_post: { - parameters: { - query?: { - triggered_by?: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': string[]; - }; - }; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_runs_evaluations_runs_get: { - parameters: { - query?: { - limit?: number; - offset?: number; - status?: string | null; - table_id?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_run_evaluations_runs__run_id__get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvalRunRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_run_report_evaluations_runs__run_id__report_get: { - parameters: { - query?: never; - header?: never; - path: { - run_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_schedules_evaluations_schedules_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvaluationScheduleRead'][]; - }; - }; - }; - }; - create_schedule_evaluations_schedules_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['EvaluationScheduleCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvaluationScheduleRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - update_schedule_evaluations_schedules__schedule_id__put: { - parameters: { - query?: never; - header?: never; - path: { - schedule_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['EvaluationScheduleUpdate']; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvaluationScheduleRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - delete_schedule_evaluations_schedules__schedule_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - schedule_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_trends_evaluations_analytics_trends_get: { - parameters: { - query?: { - days?: number; - table_id?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_table_analytics_evaluations_analytics_tables_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - }; - }; - compare_runs_evaluations_compare_get: { - parameters: { - query: { - run1: string; - run2: string; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_alerts_evaluations_alerts_get: { - parameters: { - query?: { - acknowledged?: boolean | null; - limit?: number; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvaluationAlertRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - acknowledge_alert_evaluations_alerts__alert_id__acknowledge_post: { - parameters: { - query?: never; - header?: never; - path: { - alert_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['EvaluationAlertRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - system_health_evaluations_system_health_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - }; - }; - publish_table_tables__table_id__publish_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_scopes_scopes_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['UserScopeRead'][]; - }; - }; - }; - }; - create_scope_scopes_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['UserScopeCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['UserScopeRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - activate_scope_scopes__scope_id__activate_post: { - parameters: { - query?: never; - header?: never; - path: { - scope_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['UserScopeRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - list_audit_queries_audit_queries_get: { - parameters: { - query?: { - table_id?: string | null; - user_id?: string | null; - limit?: number; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['AuditQueryRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_table_profile_tables__table_id__profile_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableProfileRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - run_all_profiles_tables_all_profile_run_post: { - parameters: { - query?: { - force?: boolean; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - run_table_profile_tables__table_id__profile_run_post: { - parameters: { - query?: { - force?: boolean; - }; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableProfileRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_column_profiles_tables__table_id__profile_columns_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['ColumnProfileRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_single_column_profile_tables__table_id__columns__column__profile_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - column: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['ColumnProfileRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_profile_context_tables__table_id__profile_context_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': Record; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_cross_profiles_tables__table_id__cross_profile_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['CrossTableProfileRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - cross_profile_tables__table_id__cross_profile_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['CrossTableProfileRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - submit_feedback_feedback_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['QueryFeedbackCreate']; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['QueryFeedbackRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_table_feedback_feedback_table__table_id__get: { - parameters: { - query?: { - limit?: number; - }; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['QueryFeedbackRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_query_feedback_feedback_query__query_id__get: { - parameters: { - query?: never; - header?: never; - path: { - query_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['QueryFeedbackRead'][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_pending_tables_admin_tables_pending_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': Record[]; - }; - }; - }; - }; - approve_table_admin_tables__table_id__approve_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - reject_table_admin_tables__table_id__reject_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - 'application/json': components['schemas']['RejectionNote']; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_table_health_tables__table_id__health_get: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableHealthRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - recompute_health_tables__table_id__health_recompute_post: { - parameters: { - query?: never; - header?: never; - path: { - table_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableHealthRead']; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - get_all_health_health_all_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TableHealthRead'][]; - }; - }; - }; - }; - get_auth_config_api_v1_auth_config_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['AuthConfigRead']; - }; - }; - }; - }; - login_api_v1_auth_login__provider__get: { - parameters: { - query?: { - next_url?: string | null; - }; - header?: never; - path: { - provider: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - auth_callback_api_v1_auth_callback__provider__get: { - parameters: { - query?: never; - header?: never; - path: { - provider: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['HTTPValidationError']; - }; - }; - }; - }; - logout_api_v1_auth_logout_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - }; - }; - get_me_api_v1_auth_me_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['SecurityUserRead']; - }; - }; - }; - }; - health_check_health_get: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': unknown; - }; - }; - }; - }; + get_table_health_api_tables__table_id__health_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableHealthRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + recompute_health_api_tables__table_id__health_recompute_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableHealthRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_all_health_api_health_all_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableHealthRead"][]; + }; + }; + }; + }; + get_esca_health_api_health_esca_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; + login_api_admin_login_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LoginRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SecurityUserRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_pending_tables_api_admin_tables_pending_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record[]; + }; + }; + }; + }; + approve_table_api_admin_tables__table_id__approve_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + reject_table_api_admin_tables__table_id__reject_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["RejectionNote"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + chat_api_agent_chat_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ChatRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ChatResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + stream_agent_execution_api_agent_stream__thread_id__get: { + parameters: { + query?: never; + header?: never; + path: { + thread_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_trace_timeline_api_agent_traces__trace_id__get: { + parameters: { + query?: never; + header?: never; + path: { + trace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TraceSpan"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + suggest_fixes_api_agent_suggest_fixes_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SuggestFixesRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + login_api_v1_auth_login__provider__get: { + parameters: { + query?: { + next_url?: string | null; + }; + header?: never; + path: { + provider: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + auth_callback_api_v1_auth_callback__provider__get: { + parameters: { + query?: never; + header?: never; + path: { + provider: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + logout_api_v1_auth_logout_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; + get_auth_config_api_v1_auth_config_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuthConfigRead"]; + }; + }; + }; + }; + get_me_api_v1_auth_me_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SecurityUserRead"]; + }; + }; + }; + }; + list_tables_api_tables_get: { + parameters: { + query?: { + status?: components["schemas"]["TableStatus"] | null; + owner_id?: string | null; + search?: string | null; + }; + header?: { + "x-scope-id"?: string | null; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_table_api_tables_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["TableCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_table_api_tables__table_id__get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + sync_table_schema_api_tables__table_id__sync_schema_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_table_status_api_tables__table_id__status_patch: { + parameters: { + query: { + status: components["schemas"]["TableStatus"]; + }; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_foreign_keys_api_tables__table_id__foreign_keys_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ForeignKeyMappingRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_foreign_key_api_tables__table_id__foreign_keys_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ForeignKeyMappingCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ForeignKeyMappingRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_foreign_key_api_tables__table_id__foreign_keys__fk_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + fk_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_enrichment_api_tables__table_id__enrichment_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["EnrichmentCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EnrichmentRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_latest_enrichment_api_tables__table_id__enrichment_latest_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EnrichmentRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_questions_api_tables__table_id__questions_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GoldenQuestionRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_question_api_tables__table_id__questions_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["GoldenQuestionCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["GoldenQuestionRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + upload_questions_api_tables__table_id__questions_upload_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "multipart/form-data": components["schemas"]["Body_upload_questions_api_tables__table_id__questions_upload_post"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_question_api_tables__table_id__questions__question_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + question_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_readiness_api_eval_readiness_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; + trigger_eval_api_tables__table_id__eval_run_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_runs_api_tables__table_id__eval_runs_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_all_eval_runs_api_eval_runs_all_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"][]; + }; + }; + }; + }; + get_batch_runs_api_eval_batch__promotion_run_id__get: { + parameters: { + query?: never; + header?: never; + path: { + promotion_run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_run_api_eval__run_id__get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_results_api_eval__run_id__results_get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalResultRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_run_report_api_eval__run_id__report_get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_regression_diff_api_eval__run_id__regression_diff_get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_extractors_api_extractors_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HttpExtractorRead"][]; + }; + }; + }; + }; + create_extractor_api_extractors_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["HttpExtractorCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HttpExtractorRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_extractor_api_extractors__extractor_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + extractor_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + trigger_evaluation_run_api_evaluations_run_post: { + parameters: { + query?: { + triggered_by?: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": string[]; + }; + }; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_runs_api_evaluations_runs_get: { + parameters: { + query?: { + limit?: number; + offset?: number; + status?: string | null; + table_id?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_run_api_evaluations_runs__run_id__get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvalRunRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_run_report_api_evaluations_runs__run_id__report_get: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_schedules_api_evaluations_schedules_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvaluationScheduleRead"][]; + }; + }; + }; + }; + create_schedule_api_evaluations_schedules_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["EvaluationScheduleCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvaluationScheduleRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_schedule_api_evaluations_schedules__schedule_id__put: { + parameters: { + query?: never; + header?: never; + path: { + schedule_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["EvaluationScheduleUpdate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvaluationScheduleRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_schedule_api_evaluations_schedules__schedule_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + schedule_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_trends_api_evaluations_analytics_trends_get: { + parameters: { + query?: { + days?: number; + table_id?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_table_analytics_api_evaluations_analytics_tables_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; + compare_runs_api_evaluations_compare_get: { + parameters: { + query: { + run1: string; + run2: string; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_alerts_api_evaluations_alerts_get: { + parameters: { + query?: { + acknowledged?: boolean | null; + limit?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvaluationAlertRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + acknowledge_alert_api_evaluations_alerts__alert_id__acknowledge_post: { + parameters: { + query?: never; + header?: never; + path: { + alert_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["EvaluationAlertRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + system_health_api_evaluations_system_health_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; + publish_table_api_tables__table_id__publish_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_scopes_api_scopes_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserScopeRead"][]; + }; + }; + }; + }; + create_scope_api_scopes_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["UserScopeCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserScopeRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + activate_scope_api_scopes__scope_id__activate_post: { + parameters: { + query?: never; + header?: never; + path: { + scope_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["UserScopeRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_audit_queries_api_audit_queries_get: { + parameters: { + query?: { + table_id?: string | null; + user_id?: string | null; + limit?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AuditQueryRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_table_profile_api_tables__table_id__profile_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableProfileRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + run_all_profiles_api_tables_all_profile_run_post: { + parameters: { + query?: { + force?: boolean; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + run_table_profile_api_tables__table_id__profile_run_post: { + parameters: { + query?: { + force?: boolean; + }; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["TableProfileRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_column_profiles_api_tables__table_id__profile_columns_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ColumnProfileRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_single_column_profile_api_tables__table_id__columns__column__profile_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + column: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ColumnProfileRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_profile_context_api_tables__table_id__profile_context_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": Record; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_cross_profiles_api_tables__table_id__cross_profile_get: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CrossTableProfileRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + cross_profile_api_tables__table_id__cross_profile_post: { + parameters: { + query?: never; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["CrossTableProfileRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + submit_feedback_api_feedback_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["QueryFeedbackCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QueryFeedbackRead"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_table_feedback_api_feedback_table__table_id__get: { + parameters: { + query?: { + limit?: number; + }; + header?: never; + path: { + table_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QueryFeedbackRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_query_feedback_api_feedback_query__query_id__get: { + parameters: { + query?: never; + header?: never; + path: { + query_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QueryFeedbackRead"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + health_check_health_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; } diff --git a/frontend/src/components/tables/TableList.tsx b/frontend/src/components/tables/TableList.tsx index 9c356cd..b91b97c 100644 --- a/frontend/src/components/tables/TableList.tsx +++ b/frontend/src/components/tables/TableList.tsx @@ -48,6 +48,7 @@ export function TableList() { handleSubmit, reset, watch, + setError, formState: { errors }, } = useForm({ resolver: zodResolver(createSchema), @@ -82,6 +83,21 @@ export function TableList() { }, [watchOasisSourceId, resetMutation]); const onSubmit = (formData: CreateSchemaType) => { + const isDuplicate = data?.some( + (t) => + t.oasis_source_id === formData.oasis_source_id || + `${t.service}.${t.catalog}.${t.schema_name}.${t.name}` === formData.oasis_source_id || + `${t.catalog}.${t.schema_name}.${t.name}` === formData.oasis_source_id + ); + + if (isDuplicate) { + setError('oasis_source_id', { + type: 'manual', + message: 'This table already exists in the system.', + }); + return; + } + createMutation.mutate(formData); }; diff --git a/frontend/src/components/wizard/OnboardingWizard.tsx b/frontend/src/components/wizard/OnboardingWizard.tsx index 96b3635..31d0ce3 100644 --- a/frontend/src/components/wizard/OnboardingWizard.tsx +++ b/frontend/src/components/wizard/OnboardingWizard.tsx @@ -135,8 +135,25 @@ export function OnboardingWizard() { try { if (step === 'select') { + const queriesData = qc.getQueriesData({ queryKey: ['tables'] }); + const existingTables = queriesData.flatMap(([_, data]) => data || []); + const sourceId = getValues('oasis_source_id'); + + if (existingTables.length > 0) { + const isDuplicate = existingTables.some( + (t) => + t.oasis_source_id === sourceId || + `${t.service}.${t.catalog}.${t.schema_name}.${t.name}` === sourceId || + `${t.catalog}.${t.schema_name}.${t.name}` === sourceId + ); + if (isDuplicate) { + setSubmitError('This table already exists in the system.'); + return; + } + } + const t = await createTableMutation.mutateAsync({ - oasis_source_id: getValues('oasis_source_id'), + oasis_source_id: sourceId, }); setCreatedTableId(t.id); setCreatedTable(t); diff --git a/frontend/src/pages/AgentTestingPage.tsx b/frontend/src/pages/AgentTestingPage.tsx index 25110e5..79369f0 100644 --- a/frontend/src/pages/AgentTestingPage.tsx +++ b/frontend/src/pages/AgentTestingPage.tsx @@ -1,9 +1,12 @@ import { memo, useEffect, useState } from 'react'; import ReactMarkdown from 'react-markdown'; -import { useMutation } from '@tanstack/react-query'; -import { Alert, Button, Divider, Input, Modal, Select, Space, Spin, Switch, Tag } from 'antd'; +import { useMutation, useQuery, type UseQueryResult } from '@tanstack/react-query'; +import { Alert, Button, Divider, Input, Modal, Select, Space, Spin, Switch, Tag, Collapse } from 'antd'; import axios from 'axios'; import { AnimatePresence, motion } from 'framer-motion'; +import { useForm, Controller, type Control } from 'react-hook-form'; +import { zodResolver } from '@hookform/resolvers/zod'; +import * as z from 'zod'; import { Activity, AlertTriangle, @@ -33,10 +36,32 @@ import { AgentGraph } from '../components/AgentGraph'; import { SchemaPlanDisplay } from '../components/SchemaPlanDisplay'; import { highlightJson, TraceTimeline } from '../components/TraceTimeline'; +import { tablesApi } from '../api/client'; import type { ChatRequest, ChatResponse } from '../api/agent'; +import type { Table } from '../types'; + +import type { components } from '../api/schema'; +export type TraceSpan = components['schemas']['TraceSpan']; + +export type ResumeValue = + | string + | Record + | { approved: boolean; feedback?: string; }; + import styles from './AgentTestingPage.module.css'; +const agentConfigSchema = z.object({ + allowedStatuses: z.array(z.string()), + allowedTables: z.array(z.string()), + tableMode: z.enum(['inclusive', 'exclusive']), + hitlEnabled: z.boolean(), + extractors: z.array(z.string()), + activeSkills: z.array(z.string()), + executionMode: z.string().optional(), +}); +type AgentConfigValues = z.infer; + const formatLabel = (str: string) => { return str .split('_') @@ -353,17 +378,13 @@ const CollapsibleTraceBlock = ({ // ---------------------------------------------------------------------- const AgentTestingHeader = memo( ({ - hitlEnabled, - setHitlEnabled, - allowedStatuses, - setAllowedStatuses, + control, + tablesQuery, }: { - hitlEnabled: boolean; - setHitlEnabled: (v: boolean) => void; - allowedStatuses: string[]; - setAllowedStatuses: (v: string[]) => void; + control: Control; + tablesQuery: UseQueryResult; }) => ( -
+

@@ -373,28 +394,149 @@ const AgentTestingHeader = memo( Test the agent directly. Toggle human-in-the-loop to approve or reject the agent's work.

-
-
- Human in the Loop - -
-
- Table Status - + )} + /> +
+ +
+ Specific Tables + ( + + )} + /> +
+ +
+ HITL + ( + + )} + /> +
+ + {/* Section 3: Advanced Configuration */} + Advanced Configuration, + children: ( +
+
+ Extractors (UUID or Name) + ( + + )} + /> +
+ +
+ Execution Mode + ( + + )} + /> +
+
+ ), + }, + ]} + />
), @@ -445,20 +587,15 @@ const AgentChatInput = ({ // ---------------------------------------------------------------------- const AgentApprovalForm = ({ chatResponse, - threadId, isResuming, onApprove, onReject, }: { chatResponse: ChatResponse; - threadId: string; isResuming: boolean; - onApprove: (resumeValue?: any) => void; - onReject: (feedback: string, category?: string) => void; + onApprove: (resumeValue?: ResumeValue) => void; + onReject: (feedback: string) => void; }) => { - const [rejectionCategory, setRejectionCategory] = useState(undefined); - const [suggestedFixes, setSuggestedFixes] = useState([]); - const [loadingFixes, setLoadingFixes] = useState(false); const [feedback, setFeedback] = useState(''); const [copied, setCopied] = useState(false); @@ -478,19 +615,6 @@ const AgentApprovalForm = ({ } }; - const handleCategoryChange = (val: string) => { - setRejectionCategory(val); - if (val && threadId) { - setLoadingFixes(true); - agentApi - .suggestFixes(threadId, val) - .then(setSuggestedFixes) - .finally(() => setLoadingFixes(false)); - } else { - setSuggestedFixes([]); - } - }; - // Ambiguity Resolution UI if (interruptType === 'schema_explorer_ambiguity') { const message = @@ -574,7 +698,7 @@ const AgentApprovalForm = ({