{"openapi":"3.1.0","info":{"title":"rawquery API","description":"DuckDB + Iceberg + S3 — Query your data","version":"1.0.0"},"paths":{"/api/v1/auth/registration-status":{"get":{"tags":["auth"],"summary":"Registration Status","description":"Check if signup is open. Public, no auth.","operationId":"registration_status_api_v1_auth_registration_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/waitlist":{"post":{"tags":["auth"],"summary":"Join Waitlist","description":"Join the waitlist. Always returns 201 (don't reveal if already listed).","operationId":"join_waitlist_api_v1_auth_waitlist_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Create a new user account and send verification email.\n\nAlways returns 201 regardless of whether the email already exists,\nto prevent email enumeration attacks.","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Authenticate and get tokens.","operationId":"login_api_v1_auth_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/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","description":"Exchange refresh token for new tokens.","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Invalidate refresh token.","operationId":"logout_api_v1_auth_logout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Request a password reset email.\n\nAlways returns 200 — never reveals whether the email exists.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"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/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using a token from the reset email.\n\nInvalidates all existing sessions (refresh tokens).","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"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/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Verify email address using a token from the verification email.","operationId":"verify_email_api_v1_auth_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"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/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend verification email.\n\nAlways returns 200 — never reveals whether the email exists.","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"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/me":{"get":{"tags":["auth"],"summary":"Get Current User","description":"Get current authenticated user.","operationId":"get_current_user_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/me/change-password":{"post":{"tags":["auth"],"summary":"Change Password","description":"Change password. Requires current password. Invalidates all sessions.","operationId":"change_password_api_v1_auth_me_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/me/change-email":{"post":{"tags":["auth"],"summary":"Change Email","description":"Change email. Requires password. Sends verification to new address.","operationId":"change_email_api_v1_auth_me_change_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/me/delete-account":{"post":{"tags":["auth"],"summary":"Delete Account","description":"Soft-delete account. Requires password. Data retained for 30 days.","operationId":"delete_account_api_v1_auth_me_delete_account_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/session-token":{"post":{"tags":["auth"],"summary":"Create Session Token","description":"Exchange current auth (API key or JWT) for a fresh JWT token pair.\n\nUsed by the CLI to open the dashboard in a browser with a valid session.","operationId":"create_session_token_api_v1_auth_session_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/session-code":{"post":{"tags":["auth"],"summary":"Create Session Code","description":"Create a one-time code that can be exchanged for JWT tokens.\n\nUsed by `rq open` to pass a short-lived code in the URL instead of raw JWTs.\nThe code is valid for 60 seconds and can only be used once.\nTokens are stored encrypted — a DB dump alone cannot recover them.","operationId":"create_session_code_api_v1_auth_session_code_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCodeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/exchange-code":{"post":{"tags":["auth"],"summary":"Exchange Session Code","description":"Exchange a one-time session code for JWT tokens.\n\nThe code is consumed immediately and cannot be reused.","operationId":"exchange_session_code_api_v1_auth_exchange_code_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/api-keys":{"post":{"tags":["auth"],"summary":"Create Api Key","description":"Create a new API key. The full key is returned once; use /reveal to retrieve it later.","operationId":"create_api_key_api_v1_auth_api_keys_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["auth"],"summary":"List Api Keys","description":"List API keys for the current user. Keys are not decrypted — use reveal endpoint.","operationId":"list_api_keys_api_v1_auth_api_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyResponse"},"title":"Response List Api Keys Api V1 Auth Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/api-keys/{key_id}/reveal":{"post":{"tags":["auth"],"summary":"Reveal Api Key","description":"Reveal a full API key. Requires password re-authentication.","operationId":"reveal_api_key_api_v1_auth_api_keys__key_id__reveal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealAPIKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/api-keys/{key_id}":{"delete":{"tags":["auth"],"summary":"Revoke Api Key","description":"Revoke an API key.","operationId":"revoke_api_key_api_v1_auth_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/cli-login":{"get":{"tags":["auth"],"summary":"Cli Login Page","description":"Serve the CLI login form. Opened in the user's browser by `rq login`.","operationId":"cli_login_page_api_v1_auth_cli_login_get","parameters":[{"name":"callback_port","in":"query","required":true,"schema":{"type":"integer","maximum":65535,"minimum":1024,"title":"Callback Port"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":128,"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["auth"],"summary":"Cli Login Submit","description":"Validate credentials, create a CLI API key, redirect to the local callback.\n\nOn error, re-renders the form with the error message.","operationId":"cli_login_submit_api_v1_auth_cli_login_post","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_cli_login_submit_api_v1_auth_cli_login_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","description":"List all workspaces the current user is a member of.","operationId":"list_workspaces_api_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkspaceWithRoleResponse"},"type":"array","title":"Response List Workspaces Api V1 Workspaces Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["workspaces"],"summary":"Create Workspace","description":"Create a new workspace.","operationId":"create_workspace_api_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Get Workspace","description":"Get a workspace by ID.","operationId":"get_workspace_api_v1_workspaces__workspace_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceWithRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Workspace","description":"Delete a workspace and all its data. Caller must be the workspace OWNER.","operationId":"delete_workspace_api_v1_workspaces__workspace_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members":{"get":{"tags":["workspaces"],"summary":"List Members","description":"List members of a workspace.","operationId":"list_members_api_v1_workspaces__workspace_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"},"title":"Response List Members Api V1 Workspaces  Workspace Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["workspaces"],"summary":"Add Member","description":"Add a member to a workspace by email. Caller must be OWNER or ADMIN.","operationId":"add_member_api_v1_workspaces__workspace_id__members_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddMemberRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members/{member_id}":{"patch":{"tags":["workspaces"],"summary":"Update Member Role","description":"Update a member's role. Caller must be OWNER or ADMIN.","operationId":"update_member_role_api_v1_workspaces__workspace_id__members__member_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Remove Member","description":"Remove a member from a workspace. Caller must be OWNER or ADMIN. Cannot remove the owner.","operationId":"remove_member_api_v1_workspaces__workspace_id__members__member_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"member_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query":{"post":{"tags":["query"],"summary":"Execute Query","description":"Execute a SQL query.\n\nThe query is parsed from Postgres dialect, translated to DuckDB,\nand executed. Results are returned as JSON.\n\nOptions:\n- estimate_only: Return cost estimate without executing\n- force: Execute even if estimate exceeds limit","operationId":"execute_query_api_v1_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryResponse"},{"$ref":"#/components/schemas/EstimateOnlyResponse"}],"title":"Response Execute Query Api V1 Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/query/tables":{"get":{"tags":["query"],"summary":"List Tables","description":"List available Iceberg tables for the user's workspace.","operationId":"list_tables_api_v1_query_tables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TablesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query/tables/{table_name}/metadata":{"get":{"tags":["query"],"summary":"Get Table Metadata","description":"Get detailed metadata for a specific table.","operationId":"get_table_metadata_api_v1_query_tables__table_name__metadata_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query/tables/{schema_name}/{table_name}":{"delete":{"tags":["query"],"summary":"Delete Table","description":"Drop an Iceberg table from the catalog and purge its data.","operationId":"delete_table_api_v1_query_tables__schema_name___table_name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"schema_name","in":"path","required":true,"schema":{"type":"string","title":"Schema Name"}},{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query/jobs":{"post":{"tags":["query"],"summary":"Submit Job","description":"Submit a query job to the async queue.\n\nRate limiting is applied atomically - check and submit in one transaction.\nHigher priority jobs are processed first.","operationId":"submit_job_api_v1_query_jobs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/query/jobs/{job_id}":{"get":{"tags":["query"],"summary":"Get Job Status","description":"Get the status of a query job.","operationId":"get_job_status_api_v1_query_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["query"],"summary":"Cancel Job","description":"Cancel a pending query job. Only pending jobs can be cancelled.","operationId":"cancel_job_api_v1_query_jobs__job_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/query/rate-limit":{"get":{"tags":["query"],"summary":"Get Rate Limit Status","description":"Get current rate limit status for a workspace.","operationId":"get_rate_limit_status_api_v1_query_rate_limit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/query":{"post":{"tags":["query","workspaces"],"summary":"Execute Workspace Query","description":"Execute a SQL query within a workspace context.\n\nUsage is tracked for billing (bytes scanned, CPU time, rows).\nQueries are parsed from Postgres dialect and executed on DuckDB.","operationId":"execute_workspace_query_api_v1_workspaces__workspace_id__query_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/query/tables":{"get":{"tags":["query","workspaces"],"summary":"List Workspace Tables","description":"List available Iceberg tables for this workspace's Nessie branch.","operationId":"list_workspace_tables_api_v1_workspaces__workspace_id__query_tables_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TablesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/query/tables/{table_name}/metadata":{"get":{"tags":["query","workspaces"],"summary":"Get Workspace Table Metadata","description":"Get detailed metadata for a table on this workspace's Nessie branch.","operationId":"get_workspace_table_metadata_api_v1_workspaces__workspace_id__query_tables__table_name__metadata_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections":{"post":{"tags":["connections"],"summary":"Create Connection","description":"Create a new connection.","operationId":"create_connection_api_v1_workspaces__workspace_id__connections_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["connections"],"summary":"List Connections","description":"List connections in a workspace.","operationId":"list_connections_api_v1_workspaces__workspace_id__connections_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionResponse"},"title":"Response List Connections Api V1 Workspaces  Workspace Id  Connections Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/sync-jobs":{"get":{"tags":["connections"],"summary":"List Workspace Sync Jobs","description":"List all sync jobs across all connections in a workspace.","operationId":"list_workspace_sync_jobs_api_v1_workspaces__workspace_id__connections_sync_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSyncJobResponse"},"title":"Response List Workspace Sync Jobs Api V1 Workspaces  Workspace Id  Connections Sync Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}":{"get":{"tags":["connections"],"summary":"Get Connection","description":"Get a connection by ID.","operationId":"get_connection_api_v1_workspaces__workspace_id__connections__connection_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["connections"],"summary":"Delete Connection","description":"Delete a connection.","operationId":"delete_connection_api_v1_workspaces__workspace_id__connections__connection_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["connections"],"summary":"Update Connection","description":"Update connection settings (sync schedule, query mode, spec).","operationId":"update_connection_api_v1_workspaces__workspace_id__connections__connection_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/test":{"post":{"tags":["connections"],"summary":"Test Connection","description":"Test a connection.","operationId":"test_connection_api_v1_workspaces__workspace_id__connections__connection_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestConnectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/streams":{"get":{"tags":["connections"],"summary":"Discover Streams","description":"Discover available streams from a connection.","operationId":"discover_streams_api_v1_workspaces__workspace_id__connections__connection_id__streams_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StreamInfo"},"title":"Response Discover Streams Api V1 Workspaces  Workspace Id  Connections  Connection Id  Streams Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync-status":{"get":{"tags":["connections"],"summary":"Get Sync Status","description":"Get sync status for all streams of a connection.","operationId":"get_sync_status_api_v1_workspaces__workspace_id__connections__connection_id__sync_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SyncStateResponse"},"title":"Response Get Sync Status Api V1 Workspaces  Workspace Id  Connections  Connection Id  Sync Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync":{"post":{"tags":["connections"],"summary":"Trigger Sync","description":"Submit an async sync job for a connection.\n\nReturns immediately with a job_id. Poll via GET sync-jobs/{job_id}.","operationId":"trigger_sync_api_v1_workspaces__workspace_id__connections__connection_id__sync_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TriggerSyncRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync-jobs":{"get":{"tags":["connections"],"summary":"List Sync Jobs","description":"List sync jobs for a connection, most recent first.","operationId":"list_sync_jobs_api_v1_workspaces__workspace_id__connections__connection_id__sync_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SyncJobResponse"},"title":"Response List Sync Jobs Api V1 Workspaces  Workspace Id  Connections  Connection Id  Sync Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/sync-jobs/{job_id}":{"get":{"tags":["connections"],"summary":"Get Sync Job Status","description":"Get status of a sync job.","operationId":"get_sync_job_status_api_v1_workspaces__workspace_id__connections__connection_id__sync_jobs__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/connections/{connection_id}/preview":{"post":{"tags":["connections"],"summary":"Preview Connection Stream","description":"Preview first rows from a connection stream.","operationId":"preview_connection_stream_api_v1_workspaces__workspace_id__connections__connection_id__preview_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connection Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/connections/available-types":{"get":{"tags":["connections"],"summary":"Get Available Types","description":"List available connector types and their configuration status.","operationId":"get_available_types_api_v1_connections_available_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ConnectorTypeInfo"},"type":"array","title":"Response Get Available Types Api V1 Connections Available Types Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/oauth/hubspot/authorize":{"get":{"tags":["oauth"],"summary":"Hubspot Authorize","description":"Start HubSpot OAuth flow.\n\nReturns URL to redirect user to HubSpot authorization page.","operationId":"hubspot_authorize_api_v1_oauth_hubspot_authorize_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":63,"title":"Workspace Id"}},{"name":"connection_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"title":"Connection Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/hubspot/callback":{"get":{"tags":["oauth"],"summary":"Hubspot Callback","description":"HubSpot OAuth callback.\n\nExchanges authorization code for tokens and creates the connection.\nRedirects to frontend.","operationId":"hubspot_callback_api_v1_oauth_hubspot_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/usage":{"get":{"tags":["billing"],"summary":"Get Usage","description":"Get usage summary for a workspace.\n\nDefault period is current month.","operationId":"get_usage_api_v1_workspaces__workspace_id__usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/usage/daily":{"get":{"tags":["billing"],"summary":"Get Daily Usage","description":"Get daily usage breakdown for a workspace.\n\nDefault period is last 30 days.","operationId":"get_daily_usage_api_v1_workspaces__workspace_id__usage_daily_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DailyUsageResponse"},"title":"Response Get Daily Usage Api V1 Workspaces  Workspace Id  Usage Daily Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/usage/current":{"get":{"tags":["billing"],"summary":"Get Current Period","description":"Get current billing period usage.\n\nBilling period is the calendar month.","operationId":"get_current_period_api_v1_workspaces__workspace_id__usage_current_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentPeriodUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/usage/dashboard":{"get":{"tags":["billing"],"summary":"Get Usage Dashboard","description":"Usage dashboard: queries used, plan limits, estimated cost MTD.","operationId":"get_usage_dashboard_api_v1_workspaces__workspace_id__usage_dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/usage/export":{"get":{"tags":["billing"],"summary":"Export Usage","description":"Export individual usage records as CSV or JSON.","operationId":"export_usage_api_v1_workspaces__workspace_id__usage_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Start date (YYYY-MM-DD)","title":"Start Date"},"description":"Start date (YYYY-MM-DD)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End date (YYYY-MM-DD)","title":"End Date"},"description":"End date (YYYY-MM-DD)"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: csv or json","default":"csv","title":"Format"},"description":"Export format: csv or json"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhooks/paddle":{"post":{"tags":["billing"],"summary":"Paddle Webhook","description":"Handle Paddle webhook events.\n\nVerifies signature and processes subscription events.","operationId":"paddle_webhook_api_v1_billing_webhooks_paddle_post","parameters":[{"name":"Paddle-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paddle-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/billing/status":{"get":{"tags":["billing"],"summary":"Get Billing Status","description":"Get billing status for a workspace.","operationId":"get_billing_status_api_v1_workspaces__workspace_id__billing_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/billing/setup":{"post":{"tags":["billing"],"summary":"Setup Billing","description":"Set up billing for a workspace.\n\nCreates a Paddle customer if not exists. Returns the paddle_customer_id\nfor the frontend to use with Paddle.js checkout.","operationId":"setup_billing_api_v1_workspaces__workspace_id__billing_setup_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/billing/portal-session":{"post":{"tags":["billing"],"summary":"Create Portal Session","description":"Create a Paddle customer portal session.\n\nReturns authenticated URLs for the customer to manage their subscription,\nupdate payment methods, view invoices, and cancel.","operationId":"create_portal_session_api_v1_workspaces__workspace_id__billing_portal_session_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms":{"post":{"tags":["transforms"],"summary":"Create Transform","description":"Create a new transform.","operationId":"create_transform_api_v1_workspaces__workspace_id__transforms_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransformRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["transforms"],"summary":"List Transforms","description":"List transforms in a workspace.","operationId":"list_transforms_api_v1_workspaces__workspace_id__transforms_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransformWithDepsResponse"},"title":"Response List Transforms Api V1 Workspaces  Workspace Id  Transforms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms/dag":{"get":{"tags":["transforms"],"summary":"Get Dag","description":"Get transform DAG for the workspace.","operationId":"get_dag_api_v1_workspaces__workspace_id__transforms_dag_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DAGResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms/{transform_id}":{"get":{"tags":["transforms"],"summary":"Get Transform","description":"Get a transform by ID.","operationId":"get_transform_api_v1_workspaces__workspace_id__transforms__transform_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"transform_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transform Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformWithDepsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["transforms"],"summary":"Update Transform","description":"Update a transform.","operationId":"update_transform_api_v1_workspaces__workspace_id__transforms__transform_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"transform_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transform Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTransformRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["transforms"],"summary":"Delete Transform","description":"Delete a transform.","operationId":"delete_transform_api_v1_workspaces__workspace_id__transforms__transform_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"transform_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transform Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms/{transform_id}/run":{"post":{"tags":["transforms"],"summary":"Run Transform","description":"Run a single transform (does NOT run dependencies).","operationId":"run_transform_api_v1_workspaces__workspace_id__transforms__transform_id__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"transform_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transform Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransformRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms/{transform_id}/runs":{"get":{"tags":["transforms"],"summary":"Get Transform Runs","description":"Get recent runs for a transform.","operationId":"get_transform_runs_api_v1_workspaces__workspace_id__transforms__transform_id__runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"transform_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Transform Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransformRunResponse"},"title":"Response Get Transform Runs Api V1 Workspaces  Workspace Id  Transforms  Transform Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/transforms/run":{"post":{"tags":["transforms"],"summary":"Run Transforms","description":"Run transforms in dependency order.\n\nIf transforms are specified, also runs their dependencies.\nIf no transforms specified, runs all transforms.","operationId":"run_transforms_api_v1_workspaces__workspace_id__transforms_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunTransformsRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunTransformsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/execute":{"post":{"tags":["execute"],"summary":"Execute","description":"Execute a SQL query.\n\nAuth: X-API-Key header.\nFormats: json (default), csv, objects.","operationId":"execute_api_v1_execute_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/execute/tables":{"get":{"tags":["execute"],"summary":"List Tables","description":"List available tables for the user's workspace. Auth: X-API-Key header.","operationId":"list_tables_api_v1_execute_tables_get","parameters":[{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TablesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/saved-queries":{"post":{"tags":["saved-queries"],"summary":"Create Saved Query","description":"Create a new saved query.","operationId":"create_saved_query_api_v1_workspaces__workspace_id__saved_queries_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedQueryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["saved-queries"],"summary":"List Saved Queries","description":"List saved queries in a workspace.","operationId":"list_saved_queries_api_v1_workspaces__workspace_id__saved_queries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedQueryListItem"},"title":"Response List Saved Queries Api V1 Workspaces  Workspace Id  Saved Queries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/saved-queries/{name}":{"get":{"tags":["saved-queries"],"summary":"Get Saved Query","description":"Get a saved query by name.","operationId":"get_saved_query_api_v1_workspaces__workspace_id__saved_queries__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["saved-queries"],"summary":"Update Saved Query","description":"Update a saved query.","operationId":"update_saved_query_api_v1_workspaces__workspace_id__saved_queries__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedQueryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["saved-queries"],"summary":"Delete Saved Query","description":"Delete a saved query.","operationId":"delete_saved_query_api_v1_workspaces__workspace_id__saved_queries__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/saved-queries/{name}/run":{"get":{"tags":["saved-queries"],"summary":"Run Saved Query Get","description":"Execute a saved query with parameters from query string.","operationId":"run_saved_query_get_api_v1_workspaces__workspace_id__saved_queries__name__run_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["saved-queries"],"summary":"Run Saved Query Post","description":"Execute a saved query with parameters from JSON body.","operationId":"run_saved_query_post_api_v1_workspaces__workspace_id__saved_queries__name__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RunRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/saved-queries/bulk-delete":{"post":{"tags":["saved-queries"],"summary":"Bulk Delete Saved Queries","description":"Delete multiple saved queries. Partial success allowed.","operationId":"bulk_delete_saved_queries_api_v1_workspaces__workspace_id__saved_queries_bulk_delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/overview":{"get":{"tags":["admin"],"summary":"Get Overview","description":"Platform overview: total users, workspaces, active subscriptions, MRR.","operationId":"get_overview_api_v1_admin_overview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformOverviewResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/signups":{"get":{"tags":["admin"],"summary":"Get Signups","description":"Signup trend: daily signup counts for the last N days.","operationId":"get_signups_api_v1_admin_signups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignupPointResponse"},"title":"Response Get Signups Api V1 Admin Signups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/plans":{"get":{"tags":["admin"],"summary":"Get Plans","description":"Plan distribution: count of users by plan tier.","operationId":"get_plans_api_v1_admin_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PlanDistributionResponse"},"type":"array","title":"Response Get Plans Api V1 Admin Plans Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/queries":{"get":{"tags":["admin"],"summary":"Get Queries","description":"Query volume: daily query count and bytes scanned for the last N days.","operationId":"get_queries_api_v1_admin_queries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QueryVolumePointResponse"},"title":"Response Get Queries Api V1 Admin Queries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/top-workspaces":{"get":{"tags":["admin"],"summary":"Get Top Workspaces","description":"Top workspaces by query count.","operationId":"get_top_workspaces_api_v1_admin_top_workspaces_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopWorkspaceResponse"},"title":"Response Get Top Workspaces Api V1 Admin Top Workspaces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces":{"get":{"tags":["admin"],"summary":"List Workspaces","description":"List all workspaces with billing status.","operationId":"list_workspaces_api_v1_admin_workspaces_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceDetailResponse"},"title":"Response List Workspaces Api V1 Admin Workspaces Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}":{"get":{"tags":["admin"],"summary":"Get Workspace Detail","description":"Get detailed billing/usage info for a single workspace.","operationId":"get_workspace_detail_api_v1_admin_workspaces__workspace_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}/suspend":{"post":{"tags":["admin"],"summary":"Suspend Workspace","description":"Suspend a workspace — blocks all queries and pushes.","operationId":"suspend_workspace_api_v1_admin_workspaces__workspace_id__suspend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuspendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}/unsuspend":{"post":{"tags":["admin"],"summary":"Unsuspend Workspace","description":"Unsuspend a workspace — restores access.","operationId":"unsuspend_workspace_api_v1_admin_workspaces__workspace_id__unsuspend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}/set-plan":{"post":{"tags":["admin"],"summary":"Set Workspace Plan","description":"Set manual plan override (pre-Stripe). Use 'none' to clear.","operationId":"set_workspace_plan_api_v1_admin_workspaces__workspace_id__set_plan_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/platform":{"get":{"tags":["admin"],"summary":"Get Platform Settings","description":"Get current platform settings.","operationId":"get_platform_settings_api_v1_admin_platform_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["admin"],"summary":"Update Platform Settings","description":"Update platform settings (registrations, user cap).","operationId":"update_platform_settings_api_v1_admin_platform_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlatformSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/waitlist":{"get":{"tags":["admin"],"summary":"List Waitlist","description":"List all waitlist entries.","operationId":"list_waitlist_api_v1_admin_waitlist_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WaitlistEntryResponse"},"title":"Response List Waitlist Api V1 Admin Waitlist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tickets":{"get":{"tags":["admin"],"summary":"List Tickets","description":"List all support tickets with optional filters.","operationId":"list_tickets_api_v1_admin_tickets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminTicketListItem"},"title":"Response List Tickets Api V1 Admin Tickets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tickets/{ticket_id}":{"get":{"tags":["admin"],"summary":"Get Ticket","description":"Get a single ticket with full detail.","operationId":"get_ticket_api_v1_admin_tickets__ticket_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["admin"],"summary":"Update Ticket","description":"Update ticket status and/or admin note.","operationId":"update_ticket_api_v1_admin_tickets__ticket_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTicketRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/waitlist/count":{"get":{"tags":["admin"],"summary":"Waitlist Count","description":"Get waitlist entry count.","operationId":"waitlist_count_api_v1_admin_waitlist_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistCountResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/users":{"get":{"tags":["admin"],"summary":"List Users","description":"List all users with workspace count.","operationId":"list_users_api_v1_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserListItem"},"title":"Response List Users Api V1 Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orphans":{"get":{"tags":["admin"],"summary":"Get Orphans","description":"Scan S3 and Nessie for orphaned data (files not referenced by any table).","operationId":"get_orphans_api_v1_admin_orphans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrphanReportResponse"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["admin"],"summary":"Cleanup Orphans Endpoint","description":"Delete orphaned S3 objects and Nessie branches. Default is dry_run=true.","operationId":"cleanup_orphans_endpoint_api_v1_admin_orphans_delete","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces/{workspace_id}/push":{"post":{"tags":["push"],"summary":"Push Data","description":"Push JSON records into an Iceberg table.\n\nCreates the table if it doesn't exist. Schema is inferred from the records.","operationId":"push_data_api_v1_workspaces__workspace_id__push_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts":{"post":{"tags":["charts"],"summary":"Create Chart","description":"Create a new chart.","operationId":"create_chart_api_v1_workspaces__workspace_id__charts_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["charts"],"summary":"List Charts","description":"List charts in a workspace.","operationId":"list_charts_api_v1_workspaces__workspace_id__charts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChartListItem"},"title":"Response List Charts Api V1 Workspaces  Workspace Id  Charts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts/{name}":{"get":{"tags":["charts"],"summary":"Get Chart","description":"Get a chart by name.","operationId":"get_chart_api_v1_workspaces__workspace_id__charts__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["charts"],"summary":"Update Chart","description":"Update a chart.","operationId":"update_chart_api_v1_workspaces__workspace_id__charts__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["charts"],"summary":"Delete Chart","description":"Delete a chart. Fails if referenced by pages unless force=true.","operationId":"delete_chart_api_v1_workspaces__workspace_id__charts__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts/{name}/publish":{"post":{"tags":["charts"],"summary":"Publish Chart","description":"Publish a chart — generate a public URL. Optionally password-protect.","operationId":"publish_chart_api_v1_workspaces__workspace_id__charts__name__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/api__charts__schemas__PublishRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["charts"],"summary":"Unpublish Chart","description":"Unpublish a chart — revoke public access.","operationId":"unpublish_chart_api_v1_workspaces__workspace_id__charts__name__publish_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts/bulk-delete":{"post":{"tags":["charts"],"summary":"Bulk Delete Charts","description":"Delete multiple charts. Partial success allowed.","operationId":"bulk_delete_charts_api_v1_workspaces__workspace_id__charts_bulk_delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts/bulk-publish":{"post":{"tags":["charts"],"summary":"Bulk Publish Charts","description":"Publish multiple charts. Partial success allowed.","operationId":"bulk_publish_charts_api_v1_workspaces__workspace_id__charts_bulk_publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/charts/bulk-unpublish":{"post":{"tags":["charts"],"summary":"Bulk Unpublish Charts","description":"Unpublish multiple charts. Partial success allowed.","operationId":"bulk_unpublish_charts_api_v1_workspaces__workspace_id__charts_bulk_unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/pages":{"post":{"tags":["pages"],"summary":"Create Page","description":"Create a new page.","operationId":"create_page_api_v1_workspaces__workspace_id__pages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["pages"],"summary":"List Pages","description":"List pages in a workspace.","operationId":"list_pages_api_v1_workspaces__workspace_id__pages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PageListItem"},"title":"Response List Pages Api V1 Workspaces  Workspace Id  Pages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/pages/{name}":{"get":{"tags":["pages"],"summary":"Get Page","description":"Get a page by name.","operationId":"get_page_api_v1_workspaces__workspace_id__pages__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["pages"],"summary":"Update Page","description":"Update a page.","operationId":"update_page_api_v1_workspaces__workspace_id__pages__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pages"],"summary":"Delete Page","description":"Delete a page.","operationId":"delete_page_api_v1_workspaces__workspace_id__pages__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/pages/{name}/publish":{"post":{"tags":["pages"],"summary":"Publish Page","description":"Publish a page — generate a public URL.","operationId":"publish_page_api_v1_workspaces__workspace_id__pages__name__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/api__pages__schemas__PublishRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["pages"],"summary":"Unpublish Page","description":"Unpublish a page — revoke public access.","operationId":"unpublish_page_api_v1_workspaces__workspace_id__pages__name__publish_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/support/tickets":{"post":{"tags":["support"],"summary":"Create Ticket","description":"Create a support ticket. Optionally pass ?workspace=<id> for context.","operationId":"create_ticket_api_v1_support_tickets_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["support"],"summary":"List Tickets","description":"List the current user's tickets.","operationId":"list_tickets_api_v1_support_tickets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TicketListItem"},"title":"Response List Tickets Api V1 Support Tickets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/support/tickets/{ticket_id}":{"get":{"tags":["support"],"summary":"Get Ticket","description":"Get a ticket by ID. Users can only see their own tickets.","operationId":"get_ticket_api_v1_support_tickets__ticket_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/embed":{"post":{"tags":["embed"],"summary":"Submit Embed Job","description":"Submit an embed job. Returns immediately with job ID.\n\nThe job runs in the background: reads the source table, embeds text columns,\nwrites the result to the output table with a FLOAT[768] embedding column.","operationId":"submit_embed_job_api_v1_workspaces__workspace_id__embed_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/embed/{job_id}":{"get":{"tags":["embed"],"summary":"Get Embed Job","description":"Poll embed job status.","operationId":"get_embed_job_api_v1_workspaces__workspace_id__embed__job_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches":{"post":{"tags":["searches"],"summary":"Create Search","description":"Create a new search configuration.","operationId":"create_search_api_v1_workspaces__workspace_id__searches_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["searches"],"summary":"List Searches","description":"List searches in a workspace.","operationId":"list_searches_api_v1_workspaces__workspace_id__searches_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchListItem"},"title":"Response List Searches Api V1 Workspaces  Workspace Id  Searches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/{name}":{"get":{"tags":["searches"],"summary":"Get Search","description":"Get search configuration by name.","operationId":"get_search_api_v1_workspaces__workspace_id__searches__name__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["searches"],"summary":"Update Search","description":"Update a search configuration.","operationId":"update_search_api_v1_workspaces__workspace_id__searches__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["searches"],"summary":"Delete Search","description":"Delete a search and its auto-generated saved query.","operationId":"delete_search_api_v1_workspaces__workspace_id__searches__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/{name}/publish":{"post":{"tags":["searches"],"summary":"Publish Search","description":"Publish a search with an optional password.","operationId":"publish_search_api_v1_workspaces__workspace_id__searches__name__publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/api__searches__schemas__PublishRequest"},{"type":"null"}],"title":"Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["searches"],"summary":"Unpublish Search","description":"Revoke public access to a search.","operationId":"unpublish_search_api_v1_workspaces__workspace_id__searches__name__publish_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/{name}/run":{"post":{"tags":["searches"],"summary":"Run Search","description":"Execute a search query — embeds the text and runs the saved query.","operationId":"run_search_api_v1_workspaces__workspace_id__searches__name__run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/bulk-delete":{"post":{"tags":["searches"],"summary":"Bulk Delete Searches","description":"Delete multiple searches. Partial success allowed.","operationId":"bulk_delete_searches_api_v1_workspaces__workspace_id__searches_bulk_delete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/bulk-publish":{"post":{"tags":["searches"],"summary":"Bulk Publish Searches","description":"Publish multiple searches. Partial success allowed.","operationId":"bulk_publish_searches_api_v1_workspaces__workspace_id__searches_bulk_publish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/searches/bulk-unpublish":{"post":{"tags":["searches"],"summary":"Bulk Unpublish Searches","description":"Unpublish multiple searches. Partial success allowed.","operationId":"bulk_unpublish_searches_api_v1_workspaces__workspace_id__searches_bulk_unpublish_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkNamesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/export/{schema_name}/{table_name}":{"get":{"tags":["export"],"summary":"Export Table","description":"Export an Iceberg table as presigned S3 URLs.\n\nReturns metadata, data files, and manifest files — everything needed\nto register this table in another Iceberg catalog.","operationId":"export_table_api_v1_export__schema_name___table_name__get","parameters":[{"name":"schema_name","in":"path","required":true,"schema":{"type":"string","title":"Schema Name"}},{"name":"table_name","in":"path","required":true,"schema":{"type":"string","title":"Table Name"}},{"name":"workspace","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{token}":{"get":{"tags":["searches-public"],"summary":"Public Search Page","description":"Render the public search page.","operationId":"public_search_page_s__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{token}/search":{"get":{"tags":["searches-public"],"summary":"Public Search Query","description":"Execute a search and return JSON results.","operationId":"public_search_query_s__token__search_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/s/{token}/auth":{"post":{"tags":["searches-public"],"summary":"Public Search Auth","description":"Verify password and set access cookie.","operationId":"public_search_auth_s__token__auth_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_public_search_auth_s__token__auth_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/c/{token}":{"get":{"tags":["charts-public"],"summary":"Public Chart Page","description":"Render a published chart as an HTML page.","operationId":"public_chart_page_c__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/c/{token}/data":{"get":{"tags":["charts-public"],"summary":"Public Chart Data","description":"Execute the chart's saved query and return JSON data.","operationId":"public_chart_data_c__token__data_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/c/{token}/auth":{"post":{"tags":["charts-public"],"summary":"Public Chart Auth","description":"Verify password and set access cookie.","operationId":"public_chart_auth_c__token__auth_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_public_chart_auth_c__token__auth_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/p/{token}":{"get":{"tags":["charts-public"],"summary":"Public Page","description":"Render a published page as an HTML page with CSS Grid of charts.","operationId":"public_page_p__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/p/{token}/auth":{"post":{"tags":["charts-public"],"summary":"Public Page Auth","description":"Verify password and set access cookie for a page.","operationId":"public_page_auth_p__token__auth_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_public_page_auth_p__token__auth_post"}}}},"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","description":"Health check endpoint — pings the database.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","last_used_at","expires_at","created_at"],"title":"APIKeyResponse"},"AddMemberRequest":{"properties":{"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/MemberRole","default":"member"}},"type":"object","required":["email"],"title":"AddMemberRequest"},"AdminTicketListItem":{"properties":{"id":{"type":"string","title":"Id"},"user_email":{"type":"string","title":"User Email"},"workspace_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Slug"},"subject":{"type":"string","title":"Subject"},"severity":{"type":"string","title":"Severity"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","user_email","workspace_slug","subject","severity","status","created_at"],"title":"AdminTicketListItem"},"AdminTicketResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_email":{"type":"string","title":"User Email"},"workspace_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Slug"},"subject":{"type":"string","title":"Subject"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"status":{"type":"string","title":"Status"},"admin_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Note"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","user_email","workspace_slug","subject","description","severity","status","admin_note","created_at","updated_at"],"title":"AdminTicketResponse"},"BillingStatusResponse":{"properties":{"has_customer":{"type":"boolean","title":"Has Customer"},"has_subscription":{"type":"boolean","title":"Has Subscription"},"plan_tier":{"type":"string","title":"Plan Tier"},"plan_source":{"type":"string","title":"Plan Source"},"plan_limits":{"$ref":"#/components/schemas/PlanInfo"},"paddle_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Paddle Customer Id"},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["has_customer","has_subscription","plan_tier","plan_source","plan_limits"],"title":"BillingStatusResponse","description":"Current billing status for workspace."},"Body_cli_login_submit_api_v1_auth_cli_login_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"callback_port":{"type":"integer","maximum":65535.0,"minimum":1024.0,"title":"Callback Port"},"state":{"type":"string","maxLength":128,"minLength":16,"title":"State"}},"type":"object","required":["email","password","callback_port","state"],"title":"Body_cli_login_submit_api_v1_auth_cli_login_post"},"Body_public_chart_auth_c__token__auth_post":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Body_public_chart_auth_c__token__auth_post"},"Body_public_page_auth_p__token__auth_post":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Body_public_page_auth_p__token__auth_post"},"Body_public_search_auth_s__token__auth_post":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"Body_public_search_auth_s__token__auth_post"},"BulkNamesRequest":{"properties":{"names":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Names"}},"type":"object","required":["names"],"title":"BulkNamesRequest"},"BulkResult":{"properties":{"succeeded":{"items":{"type":"string"},"type":"array","title":"Succeeded"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors"}},"type":"object","required":["succeeded","errors"],"title":"BulkResult"},"ChangeEmailRequest":{"properties":{"new_email":{"type":"string","format":"email","title":"New Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["new_email","password"],"title":"ChangeEmailRequest"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChartConfig":{"properties":{"type":{"type":"string","title":"Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"x":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X"},"y":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Y"},"y2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Y2"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"colors":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Colors"},"y_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Y Format"},"x_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X Format"},"height":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":100.0},{"type":"null"}],"title":"Height"},"show_legend":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Legend"},"show_grid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Grid"},"group_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group By"},"sort":{"anyOf":[{"type":"string","pattern":"^(asc|desc|none)$"},{"type":"null"}],"title":"Sort"}},"type":"object","required":["type"],"title":"ChartConfig","description":"Chart rendering configuration."},"ChartCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","title":"Name"},"query_name":{"type":"string","maxLength":255,"minLength":1,"title":"Query Name"},"config":{"$ref":"#/components/schemas/ChartConfig"}},"type":"object","required":["name","query_name","config"],"title":"ChartCreate","description":"Create chart request."},"ChartListItem":{"properties":{"name":{"type":"string","title":"Name"},"query_name":{"type":"string","title":"Query Name"},"chart_type":{"type":"string","title":"Chart Type"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources","default":[]},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"}},"type":"object","required":["name","query_name","chart_type"],"title":"ChartListItem","description":"Chart list item (lightweight)."},"ChartResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"query_name":{"type":"string","title":"Query Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"public_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Token"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"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","query_name","config","public_token","created_by","created_at","updated_at"],"title":"ChartResponse","description":"Full chart response."},"ChartUpdate":{"properties":{"query_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Query Name"},"config":{"anyOf":[{"$ref":"#/components/schemas/ChartConfig"},{"type":"null"}]}},"type":"object","title":"ChartUpdate","description":"Update chart request. All fields optional."},"CleanupReportResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"s3_deleted_files":{"type":"integer","title":"S3 Deleted Files"},"s3_deleted_bytes":{"type":"integer","title":"S3 Deleted Bytes"},"nessie_deleted_branches":{"items":{"type":"string"},"type":"array","title":"Nessie Deleted Branches"}},"type":"object","required":["dry_run","s3_deleted_files","s3_deleted_bytes","nessie_deleted_branches"],"title":"CleanupReportResponse"},"CleanupRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"If true, only report what would be deleted","default":true}},"type":"object","title":"CleanupRequest"},"ColumnInfo":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"ColumnInfo","description":"Column metadata."},"ConnectionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"connection_type":{"$ref":"#/components/schemas/ConnectionType"},"query_mode":{"$ref":"#/components/schemas/QueryMode"},"status":{"$ref":"#/components/schemas/ConnectionStatus"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message"},"last_tested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Tested At"},"last_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync At"},"sync_schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Schedule"},"sync_mode_overrides":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Sync Mode Overrides"},"next_sync_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Sync At"},"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","connection_type","query_mode","status","status_message","last_tested_at","last_sync_at","sync_schedule","created_at","updated_at"],"title":"ConnectionResponse"},"ConnectionStatus":{"type":"string","enum":["pending","active","error","syncing"],"title":"ConnectionStatus","description":"Connection health status."},"ConnectionType":{"type":"string","enum":["stripe","hubspot","postgres","mysql","google_sheets","salesforce","shopify","http"],"title":"ConnectionType","description":"Supported connector types."},"ConnectorTypeInfo":{"properties":{"type":{"type":"string","title":"Type"},"available":{"type":"boolean","title":"Available"},"auth_method":{"type":"string","title":"Auth Method"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["type","available","auth_method"],"title":"ConnectorTypeInfo","description":"Available connector type."},"CreateAPIKeyRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["name"],"title":"CreateAPIKeyRequest"},"CreateConnectionRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"query_mode":{"$ref":"#/components/schemas/QueryMode","default":"sync"},"credentials":{"oneOf":[{"$ref":"#/components/schemas/StripeCredentials"},{"$ref":"#/components/schemas/HubSpotCredentials"},{"$ref":"#/components/schemas/PostgresCredentials"},{"$ref":"#/components/schemas/MySQLCredentials"},{"$ref":"#/components/schemas/GoogleSheetsCredentials"},{"$ref":"#/components/schemas/SalesforceCredentials"},{"$ref":"#/components/schemas/ShopifyCredentials"},{"$ref":"#/components/schemas/HttpCredentials"}],"title":"Credentials","discriminator":{"propertyName":"type","mapping":{"google_sheets":"#/components/schemas/GoogleSheetsCredentials","http":"#/components/schemas/HttpCredentials","hubspot":"#/components/schemas/HubSpotCredentials","mysql":"#/components/schemas/MySQLCredentials","postgres":"#/components/schemas/PostgresCredentials","salesforce":"#/components/schemas/SalesforceCredentials","shopify":"#/components/schemas/ShopifyCredentials","stripe":"#/components/schemas/StripeCredentials"}}}},"type":"object","required":["name","credentials"],"title":"CreateConnectionRequest","description":"Create connection request."},"CreateTransformRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"sql":{"type":"string","minLength":1,"title":"Sql"},"schedule":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Schedule"},"materialization":{"$ref":"#/components/schemas/Materialization","default":"table"},"unique_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Unique Key"}},"type":"object","required":["name","sql"],"title":"CreateTransformRequest","description":"Create transform request."},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":63,"minLength":3,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$","title":"Slug"},"region":{"type":"string","maxLength":63,"title":"Region","default":"eu-west-gra"}},"type":"object","required":["name","slug"],"title":"CreateWorkspaceRequest"},"CurrentPeriodUsageResponse":{"properties":{"bytes_scanned":{"type":"integer","title":"Bytes Scanned"},"bytes_scanned_gb":{"type":"number","title":"Bytes Scanned Gb"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"}},"type":"object","required":["bytes_scanned","bytes_scanned_gb","period_start","period_end"],"title":"CurrentPeriodUsageResponse","description":"Current billing period usage."},"DAGNodeResponse":{"properties":{"name":{"type":"string","title":"Name"},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"}},"type":"object","required":["name","depends_on"],"title":"DAGNodeResponse","description":"DAG node."},"DAGResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/DAGNodeResponse"},"type":"array","title":"Nodes"},"execution_order":{"items":{"type":"string"},"type":"array","title":"Execution Order"}},"type":"object","required":["nodes","execution_order"],"title":"DAGResponse","description":"DAG response."},"DailyUsageResponse":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"bytes_scanned":{"type":"integer","title":"Bytes Scanned"},"cpu_ms":{"type":"integer","title":"Cpu Ms"},"rows_returned":{"type":"integer","title":"Rows Returned"},"query_count":{"type":"integer","title":"Query Count"}},"type":"object","required":["date","bytes_scanned","cpu_ms","rows_returned","query_count"],"title":"DailyUsageResponse","description":"Daily usage breakdown."},"DeleteAccountRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"DeleteAccountRequest"},"EmbedJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"},"source_table":{"type":"string","title":"Source Table"},"text_columns":{"items":{"type":"string"},"type":"array","title":"Text Columns"},"output_table":{"type":"string","title":"Output Table"},"rows_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Total"},"rows_embedded":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Embedded"},"submitted_at":{"type":"string","title":"Submitted At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status","source_table","text_columns","output_table","submitted_at"],"title":"EmbedJobResponse","description":"Embed job status."},"EmbedRequest":{"properties":{"source_table":{"type":"string","minLength":3,"title":"Source Table","description":"Source table in namespace.table format (e.g., movies.licenses)"},"text_columns":{"items":{"type":"string"},"type":"array","maxItems":5,"minItems":1,"title":"Text Columns","description":"Text column(s) to embed. Multiple columns are concatenated."},"output_table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Table","description":"Output table name. Defaults to {source_table}_embedded."},"batch_size":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Batch Size","description":"Batch size for embedding API calls.","default":500}},"type":"object","required":["source_table","text_columns"],"title":"EmbedRequest","description":"Submit an embed job."},"EstimateInfo":{"properties":{"estimated_bytes":{"type":"integer","title":"Estimated Bytes"},"estimated_rows":{"type":"integer","title":"Estimated Rows"},"tables_accessed":{"items":{"type":"string"},"type":"array","title":"Tables Accessed"},"cost_eur":{"type":"number","title":"Cost Eur"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"}},"type":"object","required":["estimated_bytes","estimated_rows","tables_accessed","cost_eur"],"title":"EstimateInfo","description":"Query cost estimate."},"EstimateOnlyResponse":{"properties":{"estimate":{"$ref":"#/components/schemas/EstimateInfo"}},"type":"object","required":["estimate"],"title":"EstimateOnlyResponse","description":"Response when estimate_only=True."},"ExchangeCodeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"ExchangeCodeRequest"},"ExecuteRequest":{"properties":{"sql":{"type":"string","maxLength":100000,"minLength":1,"title":"Sql"},"format":{"type":"string","pattern":"^(json|csv|objects)$","title":"Format","default":"json"},"workspace_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspace Id"},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace"}},"type":"object","required":["sql"],"title":"ExecuteRequest","description":"Query execution request."},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"GoogleSheetsCredentials":{"properties":{"type":{"type":"string","const":"google_sheets","title":"Type","default":"google_sheets"},"service_account_json":{"type":"string","title":"Service Account Json","description":"Service account key JSON string"},"spreadsheet_id":{"type":"string","title":"Spreadsheet Id","description":"Google Sheets spreadsheet ID"}},"type":"object","required":["service_account_json","spreadsheet_id"],"title":"GoogleSheetsCredentials","description":"Google Sheets service account credentials."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HttpCredentials":{"properties":{"type":{"type":"string","const":"http","title":"Type","default":"http"},"spec":{"additionalProperties":true,"type":"object","title":"Spec","description":"Declarative connector spec (JSON)"},"auth_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Token"},"auth_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth User"},"auth_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Password"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"}},"type":"object","required":["spec"],"title":"HttpCredentials","description":"HTTP connector credentials — spec + auth."},"HubSpotCredentials":{"properties":{"type":{"type":"string","const":"hubspot","title":"Type","default":"hubspot"},"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["access_token"],"title":"HubSpotCredentials","description":"HubSpot OAuth credentials."},"JobStatusResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"},"sql":{"type":"string","title":"Sql"},"priority":{"type":"integer","title":"Priority"},"submitted_at":{"type":"string","title":"Submitted At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"result_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Path"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["job_id","status","sql","priority","submitted_at"],"title":"JobStatusResponse","description":"Job status response."},"JobSubmitRequest":{"properties":{"sql":{"type":"string","maxLength":100000,"title":"Sql"},"workspace_id":{"type":"string","format":"uuid","title":"Workspace Id"}},"type":"object","required":["sql","workspace_id"],"title":"JobSubmitRequest","description":"Submit a query job to the queue."},"JobSubmitResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"JobSubmitResponse","description":"Response after submitting a job."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"Materialization":{"type":"string","enum":["table","incremental","view"],"title":"Materialization","description":"Transform materialization strategy."},"MemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"role":{"$ref":"#/components/schemas/MemberRole"}},"type":"object","required":["user_id","email","role"],"title":"MemberResponse"},"MemberRole":{"type":"string","enum":["owner","admin","member","viewer"],"title":"MemberRole","description":"Workspace membership roles."},"MySQLCredentials":{"properties":{"type":{"type":"string","const":"mysql","title":"Type","default":"mysql"},"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":3306},"database":{"type":"string","title":"Database"},"user":{"type":"string","title":"User"},"password":{"type":"string","title":"Password"},"ssl":{"type":"boolean","title":"Ssl","default":false}},"type":"object","required":["host","database","user","password"],"title":"MySQLCredentials","description":"MySQL connection credentials."},"NessieOrphansResponse":{"properties":{"orphaned_branches":{"items":{"type":"string"},"type":"array","title":"Orphaned Branches"},"total_orphaned_branches":{"type":"integer","title":"Total Orphaned Branches"}},"type":"object","required":["orphaned_branches","total_orphaned_branches"],"title":"NessieOrphansResponse"},"OrphanReportResponse":{"properties":{"s3":{"$ref":"#/components/schemas/S3OrphansResponse"},"nessie":{"$ref":"#/components/schemas/NessieOrphansResponse"}},"type":"object","required":["s3","nessie"],"title":"OrphanReportResponse"},"OrphanedPrefixResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"files":{"type":"integer","title":"Files"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["prefix","files","size_bytes"],"title":"OrphanedPrefixResponse"},"PageChartEntry":{"properties":{"name":{"type":"string","title":"Name"},"span":{"type":"integer","title":"Span","default":1}},"type":"object","required":["name"],"title":"PageChartEntry","description":"A chart reference in a page — name + optional column span."},"PageCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","title":"Name"},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"},"columns":{"type":"integer","maximum":4.0,"minimum":1.0,"title":"Columns","default":2},"charts":{"items":{"$ref":"#/components/schemas/PageChartEntry"},"type":"array","minItems":1,"title":"Charts"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"refresh_interval":{"anyOf":[{"type":"integer","minimum":300.0},{"type":"null"}],"title":"Refresh Interval"}},"type":"object","required":["name","charts"],"title":"PageCreate","description":"Create page request."},"PageListItem":{"properties":{"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"chart_count":{"type":"integer","title":"Chart Count"},"columns":{"type":"integer","title":"Columns"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"}},"type":"object","required":["name","title","chart_count","columns"],"title":"PageListItem","description":"Page list item (lightweight)."},"PageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"columns":{"type":"integer","title":"Columns"},"charts":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Charts"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"refresh_interval":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refresh Interval"},"public_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Token"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"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","title","columns","charts","params","refresh_interval","public_token","created_by","created_at","updated_at"],"title":"PageResponse","description":"Full page response."},"PageUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title"},"columns":{"anyOf":[{"type":"integer","maximum":4.0,"minimum":1.0},{"type":"null"}],"title":"Columns"},"charts":{"anyOf":[{"items":{"$ref":"#/components/schemas/PageChartEntry"},"type":"array"},{"type":"null"}],"title":"Charts"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"refresh_interval":{"anyOf":[{"type":"integer","minimum":300.0},{"type":"null"}],"title":"Refresh Interval"}},"type":"object","title":"PageUpdate","description":"Update page request. All fields optional."},"ParameterDef":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","pattern":"^(string|integer|float|boolean|embedding)$","title":"Type"},"required":{"type":"boolean","title":"Required","default":true},"default":{"anyOf":[{},{"type":"null"}],"title":"Default"}},"type":"object","required":["name","type"],"title":"ParameterDef","description":"Parameter definition for a saved query."},"PlanDistributionResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["tier","count"],"title":"PlanDistributionResponse"},"PlanInfo":{"properties":{"tier":{"type":"string","title":"Tier"},"queries_included":{"type":"integer","title":"Queries Included"},"storage_gb":{"type":"number","title":"Storage Gb"},"connectors_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connectors Max"},"queries_per_minute":{"type":"integer","title":"Queries Per Minute"},"monthly_price":{"type":"number","title":"Monthly Price"}},"type":"object","required":["tier","queries_included","storage_gb","connectors_max","queries_per_minute","monthly_price"],"title":"PlanInfo","description":"Plan information."},"PlatformOverviewResponse":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"total_workspaces":{"type":"integer","title":"Total Workspaces"},"active_subscriptions":{"type":"integer","title":"Active Subscriptions"},"mrr":{"type":"number","title":"Mrr"}},"type":"object","required":["total_users","total_workspaces","active_subscriptions","mrr"],"title":"PlatformOverviewResponse"},"PlatformSettingsResponse":{"properties":{"registrations_open":{"type":"boolean","title":"Registrations Open"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"},"total_users":{"type":"integer","title":"Total Users"}},"type":"object","required":["registrations_open","max_users","total_users"],"title":"PlatformSettingsResponse"},"PlatformSettingsUpdateResponse":{"properties":{"status":{"type":"string","title":"Status"},"registrations_open":{"type":"boolean","title":"Registrations Open"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"}},"type":"object","required":["status","registrations_open"],"title":"PlatformSettingsUpdateResponse"},"PostgresCredentials":{"properties":{"type":{"type":"string","const":"postgres","title":"Type","default":"postgres"},"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port","default":5432},"database":{"type":"string","title":"Database"},"user":{"type":"string","title":"User"},"password":{"type":"string","title":"Password"},"schema":{"type":"string","title":"Schema","default":"public"},"ssl_mode":{"type":"string","title":"Ssl Mode","default":"prefer"}},"type":"object","required":["host","database","user","password"],"title":"PostgresCredentials","description":"Postgres connection credentials."},"PreviewColumn":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"PreviewColumn","description":"Column info in preview response."},"PreviewRequest":{"properties":{"stream_name":{"type":"string","minLength":1,"title":"Stream Name"}},"type":"object","required":["stream_name"],"title":"PreviewRequest","description":"Request body for stream preview."},"PreviewResponse":{"properties":{"stream":{"type":"string","title":"Stream"},"columns":{"items":{"$ref":"#/components/schemas/PreviewColumn"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"}},"type":"object","required":["stream","columns","rows"],"title":"PreviewResponse","description":"Preview response with columns and rows."},"PushRequest":{"properties":{"table":{"type":"string","minLength":3,"title":"Table","description":"Target table in namespace.table format (e.g., crm.contacts)"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":100000,"minItems":1,"title":"Records","description":"Array of JSON records to push (max 100k per request)"},"primary_key":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Primary Key","description":"Primary key column(s) for the table"},"mode":{"type":"string","title":"Mode","description":"Write mode: 'append' or 'overwrite'","default":"append"}},"type":"object","required":["table","records"],"title":"PushRequest","description":"Push data request."},"PushResponse":{"properties":{"records_written":{"type":"integer","title":"Records Written"},"table":{"type":"string","title":"Table"}},"type":"object","required":["records_written","table"],"title":"PushResponse","description":"Push result."},"QueryMode":{"type":"string","enum":["sync","live"],"title":"QueryMode","description":"How a connection is queried."},"QueryRequest":{"properties":{"sql":{"type":"string","maxLength":100000,"title":"Sql"},"workspace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace","description":"Workspace ID (optional, resolves from user if omitted)"},"estimate_only":{"type":"boolean","title":"Estimate Only","default":false},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["sql"],"title":"QueryRequest","description":"Query execution request."},"QueryResponse":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnInfo"},"type":"array","title":"Columns"},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows"},"row_count":{"type":"integer","title":"Row Count"},"execution_time_ms":{"type":"number","title":"Execution Time Ms"},"estimate":{"anyOf":[{"$ref":"#/components/schemas/EstimateInfo"},{"type":"null"}]}},"type":"object","required":["columns","rows","row_count","execution_time_ms"],"title":"QueryResponse","description":"Query execution response."},"QueryVolumePointResponse":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"},"bytes_scanned":{"type":"integer","title":"Bytes Scanned"}},"type":"object","required":["date","count","bytes_scanned"],"title":"QueryVolumePointResponse"},"RateLimitInfo":{"properties":{"current":{"type":"integer","title":"Current"},"limit":{"type":"integer","title":"Limit"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["current","limit","remaining"],"title":"RateLimitInfo","description":"Rate limit info."},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ResendVerificationRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"RevealAPIKeyRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"RevealAPIKeyRequest"},"RunRequest":{"properties":{"parameters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Parameters"},"format":{"type":"string","pattern":"^(json|csv|objects)$","title":"Format","default":"json"}},"type":"object","title":"RunRequest","description":"Execute saved query request body."},"RunTransformsRequest":{"properties":{"transforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Transforms","description":"Specific transforms to run (None = all)"}},"type":"object","title":"RunTransformsRequest","description":"Run transforms request."},"RunTransformsResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/TransformRunResponse"},"type":"array","title":"Runs"},"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["runs","succeeded","failed"],"title":"RunTransformsResponse","description":"Run transforms response."},"S3OrphansResponse":{"properties":{"orphaned_prefixes":{"items":{"$ref":"#/components/schemas/OrphanedPrefixResponse"},"type":"array","title":"Orphaned Prefixes"},"total_orphaned_files":{"type":"integer","title":"Total Orphaned Files"},"total_orphaned_bytes":{"type":"integer","title":"Total Orphaned Bytes"}},"type":"object","required":["orphaned_prefixes","total_orphaned_files","total_orphaned_bytes"],"title":"S3OrphansResponse"},"SalesforceCredentials":{"properties":{"type":{"type":"string","const":"salesforce","title":"Type","default":"salesforce"},"instance_url":{"type":"string","title":"Instance Url","default":""},"access_token":{"type":"string","title":"Access Token","default":""},"username":{"type":"string","title":"Username","default":""},"password":{"type":"string","title":"Password","default":""},"security_token":{"type":"string","title":"Security Token","default":""},"client_id":{"type":"string","title":"Client Id","default":""}},"type":"object","title":"SalesforceCredentials","description":"Salesforce credentials (token or username/password)."},"SavedQueryCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sql":{"type":"string","minLength":1,"title":"Sql"},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ParameterDef"},"type":"array"},{"type":"null"}],"title":"Parameters"},"cache_ttl_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cache Ttl Seconds"}},"type":"object","required":["name","sql"],"title":"SavedQueryCreate","description":"Create saved query request."},"SavedQueryListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"parameter_count":{"type":"integer","title":"Parameter Count"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","description","parameter_count","created_at"],"title":"SavedQueryListItem","description":"Saved query list item (lightweight)."},"SavedQueryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sql":{"type":"string","title":"Sql"},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ParameterDef"},"type":"array"},{"type":"null"}],"title":"Parameters"},"cache_ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Ttl Seconds"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"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","description","sql","parameters","cache_ttl_seconds","created_by","created_at","updated_at"],"title":"SavedQueryResponse","description":"Full saved query response."},"SavedQueryUpdate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sql":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sql"},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ParameterDef"},"type":"array"},{"type":"null"}],"title":"Parameters"},"cache_ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Ttl Seconds"}},"type":"object","title":"SavedQueryUpdate","description":"Update saved query request."},"SearchCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?$","title":"Name","description":"URL-safe slug, unique per workspace"},"source_table":{"type":"string","minLength":3,"title":"Source Table","description":"Source table in namespace.table format"},"text_column":{"type":"string","minLength":1,"title":"Text Column","description":"Column to embed and search against"},"display_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Display Columns","description":"Columns to show in search results (None = all)"},"result_limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Result Limit","description":"Default number of results","default":10},"title":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Title","description":"Display title"}},"type":"object","required":["name","source_table","text_column"],"title":"SearchCreate","description":"Create a new search."},"SearchListItem":{"properties":{"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"source_table":{"type":"string","title":"Source Table"},"text_column":{"type":"string","title":"Text Column"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"}},"type":"object","required":["name","title","source_table","text_column","public_url"],"title":"SearchListItem","description":"Lightweight search info for list views."},"SearchResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"query_name":{"type":"string","title":"Query Name"},"source_table":{"type":"string","title":"Source Table"},"embedding_table":{"type":"string","title":"Embedding Table"},"text_column":{"type":"string","title":"Text Column"},"display_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Display Columns"},"result_limit":{"type":"integer","title":"Result Limit"},"public_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Token"},"public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Url"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"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","title","query_name","source_table","embedding_table","text_column","display_columns","result_limit","public_token","public_url","created_by","created_at","updated_at"],"title":"SearchResponse","description":"Full search detail."},"SearchRunRequest":{"properties":{"query":{"type":"string","maxLength":2000,"minLength":1,"title":"Query"},"limit":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Limit"}},"type":"object","required":["query"],"title":"SearchRunRequest","description":"Run a search query."},"SearchUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"display_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Display Columns"},"result_limit":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Result Limit"}},"type":"object","title":"SearchUpdate","description":"Update a search."},"SessionCodeResponse":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"SessionCodeResponse"},"SetPlanRequest":{"properties":{"tier":{"type":"string","title":"Tier","description":"Plan tier: free, team, business, or 'none' to clear override"}},"type":"object","required":["tier"],"title":"SetPlanRequest"},"ShopifyCredentials":{"properties":{"type":{"type":"string","const":"shopify","title":"Type","default":"shopify"},"shop_url":{"type":"string","title":"Shop Url","description":"e.g. myshop.myshopify.com"},"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["shop_url","access_token"],"title":"ShopifyCredentials","description":"Shopify API credentials."},"SignupPointResponse":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"SignupPointResponse"},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"}},"type":"object","required":["email","password"],"title":"SignupRequest"},"StreamInfo":{"properties":{"name":{"type":"string","title":"Name"},"sync_modes":{"items":{"type":"string"},"type":"array","title":"Sync Modes"},"default_sync_mode":{"type":"string","title":"Default Sync Mode"},"cursor_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Field"},"primary_key":{"items":{"type":"string"},"type":"array","title":"Primary Key"},"estimated_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Rows"},"column_count":{"type":"integer","title":"Column Count","default":0}},"type":"object","required":["name","sync_modes","default_sync_mode","cursor_field","primary_key"],"title":"StreamInfo","description":"Available stream from a connection."},"StripeCredentials":{"properties":{"type":{"type":"string","const":"stripe","title":"Type","default":"stripe"},"api_key":{"type":"string","title":"Api Key","description":"Stripe secret key (sk_live_xxx or sk_test_xxx)"}},"type":"object","required":["api_key"],"title":"StripeCredentials","description":"Stripe API key credentials."},"SuspendRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"SuspendRequest"},"SyncJobResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"stream_results":{"anyOf":[{"items":{"$ref":"#/components/schemas/SyncStreamResult"},"type":"array"},{"type":"null"}],"title":"Stream Results"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"current_stream":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stream"},"rows_synced_so_far":{"type":"integer","title":"Rows Synced So Far","default":0},"streams_done":{"type":"integer","title":"Streams Done","default":0},"streams_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Streams Total"}},"type":"object","required":["job_id","status","submitted_at","started_at","completed_at","stream_results","error"],"title":"SyncJobResponse","description":"Sync job status for polling."},"SyncStateResponse":{"properties":{"stream_name":{"type":"string","title":"Stream Name"},"cursor_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Field"},"cursor_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Value"},"last_sync_started":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Started"},"last_sync_completed":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sync Completed"},"last_sync_records":{"type":"integer","title":"Last Sync Records"},"total_records_synced":{"type":"integer","title":"Total Records Synced"},"sync_count":{"type":"integer","title":"Sync Count"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["stream_name","cursor_field","cursor_value","last_sync_started","last_sync_completed","last_sync_records","total_records_synced","sync_count","error"],"title":"SyncStateResponse","description":"Sync state for a stream."},"SyncStreamResult":{"properties":{"stream_name":{"type":"string","title":"Stream Name"},"records_synced":{"type":"integer","title":"Records Synced"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sync_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sync Mode"},"schema_changes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Schema Changes"},"warnings":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Warnings"}},"type":"object","required":["stream_name","records_synced","started_at","finished_at","success"],"title":"SyncStreamResult","description":"Result of syncing a single stream."},"TableColumnInfo":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"TableColumnInfo","description":"Column details."},"TableDetailResponse":{"properties":{"name":{"type":"string","title":"Name"},"schema_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Name"},"columns":{"items":{"$ref":"#/components/schemas/TableColumnInfo"},"type":"array","title":"Columns"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["name","columns"],"title":"TableDetailResponse","description":"Detailed table metadata."},"TableInfo":{"properties":{"name":{"type":"string","title":"Name"},"schema_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schema Name"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"column_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Column Count"},"has_embedding":{"type":"boolean","title":"Has Embedding","default":false}},"type":"object","required":["name"],"title":"TableInfo","description":"Table metadata."},"TablesResponse":{"properties":{"tables":{"items":{"$ref":"#/components/schemas/TableInfo"},"type":"array","title":"Tables"}},"type":"object","required":["tables"],"title":"TablesResponse","description":"Available tables response."},"TestConnectionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"TestConnectionResponse"},"TicketCreate":{"properties":{"subject":{"type":"string","maxLength":255,"minLength":1,"title":"Subject"},"description":{"type":"string","maxLength":5000,"minLength":1,"title":"Description"},"severity":{"type":"string","pattern":"^(low|medium|high|critical)$","title":"Severity","default":"medium"}},"type":"object","required":["subject","description"],"title":"TicketCreate","description":"Create a support ticket."},"TicketListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject":{"type":"string","title":"Subject"},"severity":{"type":"string","title":"Severity"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","subject","severity","status","created_at"],"title":"TicketListItem","description":"Lightweight ticket for listing."},"TicketResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"subject":{"type":"string","title":"Subject"},"description":{"type":"string","title":"Description"},"severity":{"type":"string","title":"Severity"},"status":{"type":"string","title":"Status"},"workspace_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","subject","description","severity","status","created_at","updated_at"],"title":"TicketResponse","description":"Full ticket response."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"TopWorkspaceResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"query_count":{"type":"integer","title":"Query Count"},"member_count":{"type":"integer","title":"Member Count"}},"type":"object","required":["workspace_id","slug","name","query_count","member_count"],"title":"TopWorkspaceResponse"},"TransformResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"sql":{"type":"string","title":"Sql"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"materialization":{"$ref":"#/components/schemas/Materialization"},"unique_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Key"},"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","sql","schedule","materialization","unique_key","created_at","updated_at"],"title":"TransformResponse","description":"Transform response."},"TransformRunResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"transform_id":{"type":"string","format":"uuid","title":"Transform Id"},"status":{"$ref":"#/components/schemas/TransformStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"rows_affected":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Affected"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","transform_id","status","started_at","completed_at","rows_affected","error"],"title":"TransformRunResponse","description":"Transform run response."},"TransformStatus":{"type":"string","enum":["pending","running","success","failed"],"title":"TransformStatus","description":"Transform run status."},"TransformWithDepsResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"sql":{"type":"string","title":"Sql"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"materialization":{"$ref":"#/components/schemas/Materialization"},"unique_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"depends_on":{"items":{"type":"string"},"type":"array","title":"Depends On"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources","default":[]},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run At"}},"type":"object","required":["id","name","sql","schedule","materialization","unique_key","created_at","updated_at","depends_on"],"title":"TransformWithDepsResponse","description":"Transform with dependencies."},"TriggerSyncRequest":{"properties":{"streams":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Streams","description":"Specific streams to sync. If None, syncs all available streams."},"stream_modes":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Stream Modes","description":"Per-stream sync mode overrides (stream_name -> mode)."}},"type":"object","title":"TriggerSyncRequest","description":"Request to trigger a sync."},"TriggerSyncResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"TriggerSyncResponse","description":"Response from async sync submission."},"UpdateConnectionRequest":{"properties":{"sync_schedule":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sync Schedule","description":"Cron expression or preset (hourly, daily, weekly). Null to disable."},"sync_mode_overrides":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Sync Mode Overrides","description":"Per-stream sync mode overrides. Dict of stream_name → mode. Null to clear."},"query_mode":{"anyOf":[{"$ref":"#/components/schemas/QueryMode"},{"type":"null"}],"description":"Query mode: 'sync' or 'live'. Only postgres/mysql support 'live'."},"spec":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Spec","description":"Updated HTTP connector spec (JSON). Only for HTTP connections."}},"type":"object","title":"UpdateConnectionRequest","description":"Request to update connection settings."},"UpdatePlatformSettingsRequest":{"properties":{"registrations_open":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Registrations Open"},"max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Users"}},"type":"object","title":"UpdatePlatformSettingsRequest"},"UpdateRoleRequest":{"properties":{"role":{"$ref":"#/components/schemas/MemberRole"}},"type":"object","required":["role"],"title":"UpdateRoleRequest"},"UpdateTicketRequest":{"properties":{"status":{"anyOf":[{"type":"string","pattern":"^(open|in_progress|resolved|closed)$"},{"type":"null"}],"title":"Status"},"admin_note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Admin Note"}},"type":"object","title":"UpdateTicketRequest"},"UpdateTransformRequest":{"properties":{"sql":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sql"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Schedule"},"materialization":{"anyOf":[{"$ref":"#/components/schemas/Materialization"},{"type":"null"}]},"unique_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unique Key"}},"type":"object","title":"UpdateTransformRequest","description":"Update transform request."},"UsageDashboardResponse":{"properties":{"plan_tier":{"type":"string","title":"Plan Tier"},"plan_price":{"type":"number","title":"Plan Price"},"queries_used":{"type":"integer","title":"Queries Used"},"queries_included":{"type":"integer","title":"Queries Included"},"queries_remaining":{"type":"integer","title":"Queries Remaining"},"overage_queries":{"type":"integer","title":"Overage Queries"},"storage_used_bytes":{"type":"integer","title":"Storage Used Bytes"},"storage_used_gb":{"type":"number","title":"Storage Used Gb"},"storage_limit_gb":{"type":"number","title":"Storage Limit Gb"},"storage_remaining_gb":{"type":"number","title":"Storage Remaining Gb"},"connectors_used":{"type":"integer","title":"Connectors Used"},"connectors_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connectors Limit"},"embeddings_used":{"type":"integer","title":"Embeddings Used","default":0},"embeddings_included":{"type":"integer","title":"Embeddings Included","default":0},"embeddings_remaining":{"type":"integer","title":"Embeddings Remaining","default":0},"estimated_cost_mtd":{"type":"number","title":"Estimated Cost Mtd"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"}},"type":"object","required":["plan_tier","plan_price","queries_used","queries_included","queries_remaining","overage_queries","storage_used_bytes","storage_used_gb","storage_limit_gb","storage_remaining_gb","connectors_used","connectors_limit","estimated_cost_mtd","period_start","period_end"],"title":"UsageDashboardResponse","description":"Usage dashboard with plan limits and cost estimation."},"UsageInfo":{"properties":{"bytes_scanned":{"type":"integer","title":"Bytes Scanned"},"cpu_ms":{"type":"integer","title":"Cpu Ms"},"rows_returned":{"type":"integer","title":"Rows Returned"}},"type":"object","required":["bytes_scanned","cpu_ms","rows_returned"],"title":"UsageInfo","description":"Usage metrics for billing."},"UsageSummaryResponse":{"properties":{"total_bytes_scanned":{"type":"integer","title":"Total Bytes Scanned"},"total_bytes_scanned_gb":{"type":"number","title":"Total Bytes Scanned Gb"},"total_cpu_ms":{"type":"integer","title":"Total Cpu Ms"},"total_rows_returned":{"type":"integer","title":"Total Rows Returned"},"query_count":{"type":"integer","title":"Query Count"},"period_start":{"type":"string","format":"date","title":"Period Start"},"period_end":{"type":"string","format":"date","title":"Period End"}},"type":"object","required":["total_bytes_scanned","total_bytes_scanned_gb","total_cpu_ms","total_rows_returned","query_count","period_start","period_end"],"title":"UsageSummaryResponse","description":"Usage summary for a period."},"UserListItem":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_admin":{"type":"boolean","title":"Is Admin"},"workspace_count":{"type":"integer","title":"Workspace Count"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","is_verified","is_admin","workspace_count","created_at"],"title":"UserListItem"},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"is_verified":{"type":"boolean","title":"Is Verified"},"is_admin":{"type":"boolean","title":"Is Admin"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","is_verified","is_admin","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyEmailRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"VerifyEmailRequest"},"WaitlistCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"WaitlistCountResponse"},"WaitlistEntryResponse":{"properties":{"email":{"type":"string","title":"Email"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["email","created_at"],"title":"WaitlistEntryResponse"},"WaitlistRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"WaitlistRequest"},"WorkspaceActionResponse":{"properties":{"status":{"type":"string","title":"Status"},"workspace":{"type":"string","title":"Workspace"},"plan_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Override"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["status","workspace"],"title":"WorkspaceActionResponse"},"WorkspaceDetailResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"is_suspended":{"type":"boolean","title":"Is Suspended"},"suspended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspended Reason"},"plan_tier":{"type":"string","title":"Plan Tier"},"plan_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Override"},"queries_used":{"type":"integer","title":"Queries Used"},"queries_limit":{"type":"integer","title":"Queries Limit"},"storage_used_gb":{"type":"number","title":"Storage Used Gb"},"storage_limit_gb":{"type":"number","title":"Storage Limit Gb"},"connectors_used":{"type":"integer","title":"Connectors Used"},"connectors_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Connectors Limit"},"member_count":{"type":"integer","title":"Member Count"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["workspace_id","slug","name","is_suspended","suspended_reason","plan_tier","plan_override","queries_used","queries_limit","storage_used_gb","storage_limit_gb","connectors_used","connectors_limit","member_count","created_at"],"title":"WorkspaceDetailResponse"},"WorkspaceQueryRequest":{"properties":{"sql":{"type":"string","maxLength":100000,"title":"Sql"},"estimate_only":{"type":"boolean","title":"Estimate Only","default":false},"force":{"type":"boolean","title":"Force","default":false}},"type":"object","required":["sql"],"title":"WorkspaceQueryRequest","description":"Query execution request."},"WorkspaceQueryResponse":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnInfo"},"type":"array","title":"Columns"},"rows":{"items":{"items":{},"type":"array"},"type":"array","title":"Rows"},"row_count":{"type":"integer","title":"Row Count"},"execution_time_ms":{"type":"number","title":"Execution Time Ms"},"usage":{"$ref":"#/components/schemas/UsageInfo"},"estimate":{"anyOf":[{"$ref":"#/components/schemas/EstimateInfo"},{"type":"null"}]}},"type":"object","required":["columns","rows","row_count","execution_time_ms","usage"],"title":"WorkspaceQueryResponse","description":"Query execution response with usage tracking."},"WorkspaceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"region":{"type":"string","title":"Region"},"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","slug","region","created_at","updated_at"],"title":"WorkspaceResponse"},"WorkspaceSyncJobResponse":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"status":{"type":"string","title":"Status"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"stream_results":{"anyOf":[{"items":{"$ref":"#/components/schemas/SyncStreamResult"},"type":"array"},{"type":"null"}],"title":"Stream Results"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"current_stream":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Stream"},"rows_synced_so_far":{"type":"integer","title":"Rows Synced So Far","default":0},"streams_done":{"type":"integer","title":"Streams Done","default":0},"streams_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Streams Total"},"connection_id":{"type":"string","format":"uuid","title":"Connection Id"},"connection_name":{"type":"string","title":"Connection Name"},"connection_type":{"type":"string","title":"Connection Type"}},"type":"object","required":["job_id","status","submitted_at","started_at","completed_at","stream_results","error","connection_id","connection_name","connection_type"],"title":"WorkspaceSyncJobResponse","description":"Sync job with connection context, for workspace-level listing."},"WorkspaceWithRoleResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"region":{"type":"string","title":"Region"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"role":{"$ref":"#/components/schemas/MemberRole"},"plan_tier":{"type":"string","title":"Plan Tier","default":"free"},"table_count":{"type":"integer","title":"Table Count","default":0},"connection_count":{"type":"integer","title":"Connection Count","default":0},"chart_count":{"type":"integer","title":"Chart Count","default":0},"page_count":{"type":"integer","title":"Page Count","default":0},"search_count":{"type":"integer","title":"Search Count","default":0},"member_count":{"type":"integer","title":"Member Count","default":0}},"type":"object","required":["id","name","slug","region","created_at","updated_at","role"],"title":"WorkspaceWithRoleResponse"},"api__charts__schemas__PublishRequest":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":255,"minLength":8},{"type":"null"}],"title":"Password"}},"type":"object","title":"PublishRequest","description":"Optional password for publish."},"api__pages__schemas__PublishRequest":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":255,"minLength":8},{"type":"null"}],"title":"Password"}},"type":"object","title":"PublishRequest","description":"Optional password for publish."},"api__searches__schemas__PublishRequest":{"properties":{"password":{"anyOf":[{"type":"string","maxLength":255,"minLength":8},{"type":"null"}],"title":"Password"}},"type":"object","title":"PublishRequest","description":"Publish with optional password."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}