{"openapi":"3.1.0","info":{"title":"DMI Backend","version":"0.1.0"},"paths":{"/healthz":{"get":{"tags":["infra"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/api/v1/assistant/chats":{"post":{"tags":["assistant"],"summary":"Create Assistant Chat","description":"Start a new assistant chat (one row per 'New chat' click).","operationId":"create_assistant_chat_api_v1_assistant_chats_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}}}}},"/api/v1/assistant/chats/{chat_id}/message":{"post":{"tags":["assistant"],"summary":"Assistant Chat Message","description":"Send a message to the assistant — dispatches an agent turn.","operationId":"assistant_chat_message_api_v1_assistant_chats__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies":{"get":{"tags":["companies"],"summary":"List My Companies","description":"List every company the caller belongs to — the one cross-tenant read.","operationId":"list_my_companies_api_v1_companies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListResponse"}}}}}},"post":{"tags":["companies"],"summary":"Create Company","description":"Create a new company — caller becomes owner + default company.","operationId":"create_company_api_v1_companies_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/accept-invitation":{"post":{"tags":["companies"],"summary":"Accept Invitation","description":"Consume a pending invitation token and join its company.","operationId":"accept_invitation_api_v1_companies_accept_invitation_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationAccept"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMemberSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/invitations/validate":{"get":{"tags":["companies"],"summary":"Validate Invitation","description":"Resolve a pending invitation token for the accept page.\n\nUnauthenticated by design — the invitee has no account yet, so the\nopaque token is the credential (same posture as password-reset\nvalidation). Returns the invitee email + company name, or a domain\nerror (404 / 410) if the token is unknown, consumed, or expired.","operationId":"validate_invitation_api_v1_companies_invitations_validate_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInvitationValidateRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/switch":{"post":{"tags":["companies"],"summary":"Switch Default Company","description":"Set the caller's default company — cross-tenant by design.","operationId":"switch_default_company_api_v1_companies__company_id__switch_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Switch Default Company Api V1 Companies  Company Id  Switch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}":{"get":{"tags":["companies"],"summary":"Get Company","description":"Fetch the company referenced by the current scope.","operationId":"get_company_api_v1_companies__company_id__get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["companies"],"summary":"Update Company","description":"Rename the company — admins/owners only (operation enforces role).","operationId":"update_company_api_v1_companies__company_id__patch","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/invite":{"post":{"tags":["companies"],"summary":"Invite Member","description":"Invite a user. Returns a member summary when the email matches\nan existing ``auth.users`` row (fast-path direct add), else a\npending invitation.","operationId":"invite_member_api_v1_companies__company_id__invite_post","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyInvite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CompanyInvitationRead"},{"$ref":"#/components/schemas/CompanyMemberSummary"}],"title":"Response Invite Member Api V1 Companies  Company Id  Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/members/{member_user_id}":{"delete":{"tags":["companies"],"summary":"Remove Member","description":"Remove a member; members may only remove themselves.","operationId":"remove_member_api_v1_companies__company_id__members__member_user_id__delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Remove Member Api V1 Companies  Company Id  Members  Member User Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["companies"],"summary":"Update Member Role","description":"Change a member's role. Owners only (operation enforces role).","operationId":"update_member_role_api_v1_companies__company_id__members__member_user_id__patch","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMemberRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyMemberSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/members":{"get":{"tags":["companies"],"summary":"List Members","description":"List every member of a company. Caller must be a member.","operationId":"list_members_api_v1_companies__company_id__members_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMemberRead"},"title":"Response List Members Api V1 Companies  Company Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/invitations":{"get":{"tags":["companies"],"summary":"List Invitations","description":"List pending invitations. Caller must be an owner or admin.","operationId":"list_invitations_api_v1_companies__company_id__invitations_get","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyInvitationRead"},"title":"Response List Invitations Api V1 Companies  Company Id  Invitations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{company_id}/invitations/{invitation_id}":{"delete":{"tags":["companies"],"summary":"Cancel Invitation","description":"Revoke a pending invitation. Owners + admins only.","operationId":"cancel_invitation_api_v1_companies__company_id__invitations__invitation_id__delete","parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Company Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Cancel Invitation Api V1 Companies  Company Id  Invitations  Invitation Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me":{"get":{"tags":["me"],"summary":"Get Me","operationId":"get_me_api_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeRead"}}}}}}},"/api/v1/folders/":{"get":{"tags":["folders"],"summary":"List Folders","description":"List all folders for the current company (flat list, clients build tree from parent_folder_id).\n\nNon-owners see only folders they have at least VIEWER access to.","operationId":"list_folders_api_v1_folders__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FolderRead"},"type":"array","title":"Response List Folders Api V1 Folders  Get"}}}}}},"post":{"tags":["folders"],"summary":"Create Folder","description":"Create a new folder (optionally nested under a parent).","operationId":"create_folder_api_v1_folders__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/folders/{folder_id}":{"patch":{"tags":["folders"],"summary":"Update Folder","description":"Rename a folder.","operationId":"update_folder_api_v1_folders__folder_id__patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["folders"],"summary":"Delete Folder","description":"Delete a folder.\n\nChild folders and projects are promoted to the deleted folder's parent\n(or root if the deleted folder had no parent). Nothing is ever deleted\nas a side-effect.","operationId":"delete_folder_api_v1_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/folders/{folder_id}/move":{"patch":{"tags":["folders"],"summary":"Move Folder","description":"Move a folder to a new parent (or to root if parent_folder_id is null).\n\nReturns 409 if the move would create a circular reference.","operationId":"move_folder_api_v1_folders__folder_id__move_patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/incidents/banner":{"get":{"tags":["incidents"],"summary":"Get Active Banner","description":"Return the banner this company should see, or null.\n\nWrites are owned by the admin console (direct DB access), so this is the\nwhole backend surface for incident banners.","operationId":"get_active_banner_api_v1_incidents_banner_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IncidentBannerRead"},{"type":"null"}],"title":"Response Get Active Banner Api V1 Incidents Banner Get"}}}}}}},"/api/v1/entities/{entity_id}/comments":{"get":{"tags":["comments"],"summary":"List Record Comments","description":"The comment thread on one record, oldest first.","operationId":"list_record_comments_api_v1_entities__entity_id__comments_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"row_key","in":"query","required":true,"schema":{"type":"string","description":"The record's `_row_key`.","title":"Row Key"},"description":"The record's `_row_key`."},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["comments"],"summary":"Post Record Comment","description":"Post a comment. Requires only the ability to READ the record — a viewer\nwho cannot edit it can still comment.","operationId":"post_record_comment_api_v1_entities__entity_id__comments_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entities/{entity_id}/comment-counts":{"post":{"tags":["comments"],"summary":"Count Record Comments","description":"Comment counts for a page of records. Row keys with no visible comments\nare omitted from the response.","operationId":"count_record_comments_api_v1_entities__entity_id__comment_counts_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCountsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCounts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comment-mention-candidates":{"get":{"tags":["comments"],"summary":"Mention Candidates","description":"Members of the caller's company, for the @-mention picker.\n\nNot gated on a record: exposure equals `GET /companies/{id}/members`, which\nevery member can already call. A distinct literal path (no path params in\nfront of it), so it cannot be shadowed by `/comments/{comment_id}` or any\nother parametrized route in this router.","operationId":"mention_candidates_api_v1_comment_mention_candidates_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommentMention"},"title":"Response Mention Candidates Api V1 Comment Mention Candidates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comments/{comment_id}":{"patch":{"tags":["comments"],"summary":"Patch Comment","description":"Edit your own comment. Authors only — a comment belongs to its author.","operationId":"patch_comment_api_v1_comments__comment_id__patch","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["comments"],"summary":"Remove Comment","description":"Soft-delete your own comment. Authors only — company admins and owners\nhave no moderation power over someone else's comment.","operationId":"remove_comment_api_v1_comments__comment_id__delete","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comments/{comment_id}/like":{"put":{"tags":["comments"],"summary":"Like A Comment","description":"Like a comment. Idempotent. Requires only the ability to READ the record\n— there is no authorship rule, so you may like your own comment.","operationId":"like_a_comment_api_v1_comments__comment_id__like_put","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["comments"],"summary":"Unlike A Comment","description":"Remove your like. Idempotent — no like is not an error.","operationId":"unlike_a_comment_api_v1_comments__comment_id__like_delete","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/":{"post":{"tags":["projects"],"summary":"Create Project","description":"Create a new project. Company owners and admins can create projects.","operationId":"create_project_api_v1_projects__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["projects"],"summary":"List Projects","description":"List all projects for the current company (filtered by permissions).","operationId":"list_projects_api_v1_projects__get","parameters":[{"name":"include_suppressed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Suppressed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRead"},"title":"Response List Projects Api V1 Projects  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","description":"Get a single project by ID.","operationId":"get_project_api_v1_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update Project","description":"Update a project's name or description.","operationId":"update_project_api_v1_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete Project","description":"Hard-delete a project. FK CASCADE deletes all children.","operationId":"delete_project_api_v1_projects__project_id__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/suppress":{"post":{"tags":["projects"],"summary":"Suppress Project","description":"Soft-delete a project and cascade to all its children.","operationId":"suppress_project_api_v1_projects__project_id__suppress_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/unsuppress":{"post":{"tags":["projects"],"summary":"Unsuppress Project","description":"Restore a suppressed project and cascade-restore all its children.","operationId":"unsuppress_project_api_v1_projects__project_id__unsuppress_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/suppression-preview":{"get":{"tags":["projects"],"summary":"Get Suppression Preview","description":"Return the cross-project consumers that would break if this project is suppressed.","operationId":"get_suppression_preview_api_v1_projects__project_id__suppression_preview_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuppressionPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/favorite":{"put":{"tags":["projects"],"summary":"Favorite Project","description":"Mark this project as a favorite for the calling user only.\n\nVIEWER permission is sufficient — favorites are per-user, not shared.","operationId":"favorite_project_api_v1_projects__project_id__favorite_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Unfavorite Project","description":"Remove the calling user's favorite marker on this project.","operationId":"unfavorite_project_api_v1_projects__project_id__favorite_delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/dashboards":{"get":{"tags":["projects"],"summary":"List Project Dashboards","description":"List all dashboards in a project.","operationId":"list_project_dashboards_api_v1_projects__project_id__dashboards_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"include_suppressed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Suppressed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DashboardRead"},"title":"Response List Project Dashboards Api V1 Projects  Project Id  Dashboards Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/databases":{"get":{"tags":["projects"],"summary":"List Project Databases","description":"List all databases available to a project (owned + shared in company).","operationId":"list_project_databases_api_v1_projects__project_id__databases_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseRead"},"title":"Response List Project Databases Api V1 Projects  Project Id  Databases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/chat":{"get":{"tags":["projects"],"summary":"Get Or Create Project Chat","description":"Return the existing project chat or create one.\n\nEach project has at most one project-level chat (chat_type='project').","operationId":"get_or_create_project_chat_api_v1_projects__project_id__chat_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Or Create Project Chat Api V1 Projects  Project Id  Chat Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/run-all":{"post":{"tags":["projects"],"summary":"Run All Steps","description":"Run all active steps in a project.","operationId":"run_all_steps_api_v1_projects__project_id__run_all_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run All Steps Api V1 Projects  Project Id  Run All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/lineage":{"get":{"tags":["projects"],"summary":"Get Project Lineage","description":"Return a unified lineage DAG for the project.","operationId":"get_project_lineage_api_v1_projects__project_id__lineage_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectLineageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/":{"post":{"tags":["chats"],"summary":"Create Chat","description":"Start a new AI Architect chat for a dashboard or project.","operationId":"create_chat_api_v1_chats__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["chats"],"summary":"List Chats","description":"List chats for the current company, optionally filtered by type.","operationId":"list_chats_api_v1_chats__get","parameters":[{"name":"chat_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Type"}},{"name":"include_suppressed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Suppressed"}},{"name":"mine","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Mine"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChatRead"},"title":"Response List Chats Api V1 Chats  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}":{"get":{"tags":["chats"],"summary":"Get Chat","description":"Get a single chat by ID.","operationId":"get_chat_api_v1_chats__chat_id__get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["chats"],"summary":"Rename Chat","description":"Rename a chat (title only).","operationId":"rename_chat_api_v1_chats__chat_id__patch","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTitleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["chats"],"summary":"Delete Chat","description":"Hard-delete a chat and all its messages.","operationId":"delete_chat_api_v1_chats__chat_id__delete","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/suppress":{"post":{"tags":["chats"],"summary":"Suppress Chat","description":"Soft-delete a chat and its associated pipeline or dashboard.","operationId":"suppress_chat_api_v1_chats__chat_id__suppress_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/cancel":{"post":{"tags":["chats"],"summary":"Cancel Chat","description":"Signal the agent to cancel an in-progress generation for this chat.","operationId":"cancel_chat_api_v1_chats__chat_id__cancel_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/attachments/{key}":{"get":{"tags":["chats"],"summary":"Download Chat Attachment","description":"Stream a chat attachment by storage key.\n\nAuthz model: the signed ``token`` is the capability. Possession of a\nvalid token grants read access for the token's TTL (7 days by default,\nmatching the prior S3 presigned-URL behavior). The upload endpoint is\nstill JWT-protected, so only authed users can ever obtain a valid\ntoken. ``<img src>`` cannot send Authorization headers, so the JWT\ntrust model doesn't work here — signed URLs do.","operationId":"download_chat_attachment_api_v1_chats_attachments__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"HMAC-signed token returned by /attachments upload.","title":"Token"},"description":"HMAC-signed token returned by /attachments upload."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/attachments":{"post":{"tags":["chats"],"summary":"Upload Attachment","description":"Upload a file attachment (image or PDF) for a chat message.","operationId":"upload_attachment_api_v1_chats__chat_id__attachments_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_attachment_api_v1_chats__chat_id__attachments_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/messages":{"get":{"tags":["chats"],"summary":"List Messages","description":"Get messages with cursor-based pagination.","operationId":"list_messages_api_v1_chats__chat_id__messages_get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Messages Api V1 Chats  Chat Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["chats"],"summary":"Create Message","description":"Add a message to a chat.","operationId":"create_message_api_v1_chats__chat_id__messages_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/context-usage":{"get":{"tags":["chats"],"summary":"Get Context Usage","description":"Return context usage info for the frontend indicator.","operationId":"get_context_usage_api_v1_chats__chat_id__context_usage_get","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Context Usage Api V1 Chats  Chat Id  Context Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/compact":{"post":{"tags":["chats"],"summary":"Compact Chat","description":"Manually trigger chat compaction.","operationId":"compact_chat_api_v1_chats__chat_id__compact_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compact Chat Api V1 Chats  Chat Id  Compact Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/providers":{"get":{"tags":["integrations"],"summary":"List Providers","description":"List available providers. Optionally filter by provider_type.","operationId":"list_providers_api_v1_integrations_providers_get","parameters":[{"name":"provider_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProviderRead"},"title":"Response List Providers Api V1 Integrations Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/":{"get":{"tags":["integrations"],"summary":"List Integrations","description":"List integrations the caller can see (owners see all).","operationId":"list_integrations_api_v1_integrations__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IntegrationRead"},"type":"array","title":"Response List Integrations Api V1 Integrations  Get"}}}}}},"post":{"tags":["integrations"],"summary":"Create Integration","description":"Register or update an integration for the company (upsert by provider).\n\nHandles three paths:\n- Nango OAuth: ``nango_connection_id`` provided → mark connected.\n- Custom credentials: ``credentials`` dict provided → validate, test, encrypt.\n- Neither: mark disconnected.\n\nPer-resource permissions: any company member may CREATE a new\nintegration (they're auto-granted ADMIN on it); updating an existing\n(company, provider) row in place requires EDITOR on that integration.","operationId":"create_integration_api_v1_integrations__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/session-token":{"get":{"tags":["integrations"],"summary":"Get Nango Session Token","description":"Fetch a short-lived session token from Nango for the Connect UI.\n\nPass ?allowed_integrations=supabase to scope the session to a single provider.\nReturns the full Nango session dict (includes ``token`` + any extra fields).\n\nNote: the legacy endpoint calls Nango directly without provider validation,\nso we mirror that by going via the adapter rather than the MintNangoSessionToken\noperation (which requires a validated provider slug).\n\nPer-resource permissions: any company member may start a connect flow —\nthis runs BEFORE any integration row exists, so there is no resource to\ngate on. The creator is auto-granted ADMIN when the row is created.","operationId":"get_nango_session_token_api_v1_integrations_session_token_get","parameters":[{"name":"allowed_integrations","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowed Integrations"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Nango Session Token Api V1 Integrations Session Token Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}":{"patch":{"tags":["integrations"],"summary":"Update Integration","description":"Update an integration's status or connection details.","operationId":"update_integration_api_v1_integrations__integration_id__patch","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"nango_connection_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nango Connection Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations"],"summary":"Delete Integration","description":"Remove an integration and its Nango connection.","operationId":"delete_integration_api_v1_integrations__integration_id__delete","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/providers/{slug}/crawler-schema":{"get":{"tags":["integrations"],"summary":"Get Crawler Schema","description":"Return the wizard schema for a provider's crawler (public read).\n\nNo resource permission gate — the wizard fetches this before any\nintegration row exists (post-OAuth, pre-wizard-completion).","operationId":"get_crawler_schema_api_v1_integrations_providers__slug__crawler_schema_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlerSchemaRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/providers/{slug}/actions":{"get":{"tags":["integrations"],"summary":"List Provider Actions","description":"Typed actions available for a provider's provider_action workflow node.","operationId":"list_provider_actions_api_v1_integrations_providers__slug__actions_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProviderActionRead"},"title":"Response List Provider Actions Api V1 Integrations Providers  Slug  Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/scope-options":{"get":{"tags":["integrations"],"summary":"Get Scope Options","description":"Live scope discovery for a specific table.\n\nFetches scope items via the table's ``list_scope_items`` callable.\nResults are cached in-process for 60 seconds.","operationId":"get_scope_options_api_v1_integrations__integration_id__scope_options_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"table","in":"query","required":true,"schema":{"type":"string","title":"Table"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrawlerScopeOption"},"title":"Response Get Scope Options Api V1 Integrations  Integration Id  Scope Options Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/snowflake/databases":{"get":{"tags":["integrations"],"summary":"Get Snowflake Databases","description":"``SHOW DATABASES`` against the customer's Snowflake account.","operationId":"get_snowflake_databases_api_v1_integrations__integration_id__snowflake_databases_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnowflakeDiscoveryItem"},"title":"Response Get Snowflake Databases Api V1 Integrations  Integration Id  Snowflake Databases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/snowflake/schemas":{"get":{"tags":["integrations"],"summary":"Get Snowflake Schemas","description":"``SHOW SCHEMAS IN DATABASE <database>``. ``INFORMATION_SCHEMA``\nis filtered out by the underlying discovery function.","operationId":"get_snowflake_schemas_api_v1_integrations__integration_id__snowflake_schemas_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"database","in":"query","required":true,"schema":{"type":"string","title":"Database"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnowflakeDiscoveryItem"},"title":"Response Get Snowflake Schemas Api V1 Integrations  Integration Id  Snowflake Schemas Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/snowflake/tables":{"get":{"tags":["integrations"],"summary":"Get Snowflake Tables","description":"``SHOW TABLES IN SCHEMA <database>.<schema>``.","operationId":"get_snowflake_tables_api_v1_integrations__integration_id__snowflake_tables_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"database","in":"query","required":true,"schema":{"type":"string","title":"Database"}},{"name":"schema","in":"query","required":true,"schema":{"type":"string","title":"Schema"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnowflakeDiscoveryItem"},"title":"Response Get Snowflake Tables Api V1 Integrations  Integration Id  Snowflake Tables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/snowflake/describe":{"get":{"tags":["integrations"],"summary":"Describe Snowflake Table","description":"``DESCRIBE TABLE <database>.<schema>.<table>`` mapped to\nPolars-style types — used to populate ``columns`` in the wizard\npayload that gets PATCHed to ``crawler_table_configs``.","operationId":"describe_snowflake_table_api_v1_integrations__integration_id__snowflake_describe_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"database","in":"query","required":true,"schema":{"type":"string","title":"Database"}},{"name":"schema","in":"query","required":true,"schema":{"type":"string","title":"Schema"}},{"name":"table","in":"query","required":true,"schema":{"type":"string","title":"Table"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SnowflakeColumnSchema"},"title":"Response Describe Snowflake Table Api V1 Integrations  Integration Id  Snowflake Describe Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/databricks/warehouses":{"get":{"tags":["integrations"],"summary":"Get Databricks Warehouses","description":"``GET /api/2.0/sql/warehouses`` against the customer's workspace.","operationId":"get_databricks_warehouses_api_v1_integrations__integration_id__databricks_warehouses_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabricksWarehouseItem"},"title":"Response Get Databricks Warehouses Api V1 Integrations  Integration Id  Databricks Warehouses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/databricks/catalogs":{"get":{"tags":["integrations"],"summary":"Get Databricks Catalogs","description":"``GET /api/2.1/unity-catalog/catalogs`` — list customer catalogs\n(filtered to drop the ``system`` catalog).","operationId":"get_databricks_catalogs_api_v1_integrations__integration_id__databricks_catalogs_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabricksDiscoveryItem"},"title":"Response Get Databricks Catalogs Api V1 Integrations  Integration Id  Databricks Catalogs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/databricks/schemas":{"get":{"tags":["integrations"],"summary":"Get Databricks Schemas","description":"``GET /api/2.1/unity-catalog/schemas?catalog_name=<catalog>``.\n``information_schema`` is filtered out by the underlying discovery\nfunction.","operationId":"get_databricks_schemas_api_v1_integrations__integration_id__databricks_schemas_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"catalog","in":"query","required":true,"schema":{"type":"string","title":"Catalog"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabricksDiscoveryItem"},"title":"Response Get Databricks Schemas Api V1 Integrations  Integration Id  Databricks Schemas Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/databricks/tables":{"get":{"tags":["integrations"],"summary":"Get Databricks Tables","description":"``GET /api/2.1/unity-catalog/tables?catalog_name=<>&schema_name=<>``.","operationId":"get_databricks_tables_api_v1_integrations__integration_id__databricks_tables_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"catalog","in":"query","required":true,"schema":{"type":"string","title":"Catalog"}},{"name":"schema","in":"query","required":true,"schema":{"type":"string","title":"Schema"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabricksDiscoveryItem"},"title":"Response Get Databricks Tables Api V1 Integrations  Integration Id  Databricks Tables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/databricks/describe":{"get":{"tags":["integrations"],"summary":"Describe Databricks Table","description":"``GET /api/2.1/unity-catalog/tables/{catalog.schema.table}`` mapped to\nPolars-style types — used to populate ``columns`` in the wizard\npayload that gets PATCHed to ``crawler_table_configs``.","operationId":"describe_databricks_table_api_v1_integrations__integration_id__databricks_describe_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}},{"name":"catalog","in":"query","required":true,"schema":{"type":"string","title":"Catalog"}},{"name":"schema","in":"query","required":true,"schema":{"type":"string","title":"Schema"}},{"name":"table","in":"query","required":true,"schema":{"type":"string","title":"Table"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabricksColumnSchema"},"title":"Response Describe Databricks Table Api V1 Integrations  Integration Id  Databricks Describe Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/crawler-config":{"get":{"tags":["integrations"],"summary":"Get Crawler Config","description":"Return the effective crawler config for an integration (for the edit modal).","operationId":"get_crawler_config_api_v1_integrations__integration_id__crawler_config_get","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlerConfigRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["integrations"],"summary":"Patch Crawler Config","description":"Apply a crawler config patch and signal the running workflow.","operationId":"patch_crawler_config_api_v1_integrations__integration_id__crawler_config_patch","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlerConfigPatchBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrawlerConfigPatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/{integration_id}/refresh-crawl":{"post":{"tags":["integrations"],"summary":"Refresh Integration Crawl","description":"Wake the crawler workflow's polling loop immediately (\"Refresh now\").\n\nNo-op for providers without a registered crawler module. Falls back\nto ``start_crawler`` if no workflow is currently running.","operationId":"refresh_integration_crawl_api_v1_integrations__integration_id__refresh_crawl_post","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Refresh Integration Crawl Api V1 Integrations  Integration Id  Refresh Crawl Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/webhook":{"post":{"tags":["integrations"],"summary":"Nango Webhook","description":"Handle webhooks from Nango (connection.created / connection.updated).\n\nVerifies the HMAC-SHA256 signature using NANGO_SECRET_KEY before processing.","operationId":"nango_webhook_api_v1_integrations_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Nango Webhook Api V1 Integrations Webhook Post"}}}}}}},"/api/v1/dashboards/":{"post":{"tags":["dashboards"],"summary":"Create Dashboard","description":"Create a new dashboard (EDITOR on the project; creator gets ADMIN).","operationId":"create_dashboard_api_v1_dashboards__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["dashboards"],"summary":"List Dashboards","description":"List dashboards, optionally filtered by project (respects permissions).","operationId":"list_dashboards_api_v1_dashboards__get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"include_suppressed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Suppressed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DashboardRead"},"title":"Response List Dashboards Api V1 Dashboards  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}":{"get":{"tags":["dashboards"],"summary":"Get Dashboard","description":"Get a single dashboard by ID.","operationId":"get_dashboard_api_v1_dashboards__dashboard_id__get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["dashboards"],"summary":"Update Dashboard","description":"Update a dashboard's name or description.","operationId":"update_dashboard_api_v1_dashboards__dashboard_id__patch","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["dashboards"],"summary":"Delete Dashboard","description":"Hard-delete a dashboard. FK CASCADE deletes associated chats.","operationId":"delete_dashboard_api_v1_dashboards__dashboard_id__delete","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/chat":{"get":{"tags":["dashboards"],"summary":"Get Or Create Dashboard Chat","description":"Return the existing dashboard chat or create one.","operationId":"get_or_create_dashboard_chat_api_v1_dashboards__dashboard_id__chat_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/suppress":{"post":{"tags":["dashboards"],"summary":"Suppress Dashboard","description":"Soft-delete a dashboard and cascade suppress its chats.","operationId":"suppress_dashboard_api_v1_dashboards__dashboard_id__suppress_post","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/dependencies":{"get":{"tags":["dashboards"],"summary":"Get Dashboard Dependencies","description":"Legacy endpoint — always returns empty list (pipeline model retired).","operationId":"get_dashboard_dependencies_api_v1_dashboards__dashboard_id__dependencies_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Dashboard Dependencies Api V1 Dashboards  Dashboard Id  Dependencies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/bundle.js":{"get":{"tags":["dashboards"],"summary":"Get Dashboard Bundle","description":"Serve the dashboard's JS bundle (proxied from S3).","operationId":"get_dashboard_bundle_api_v1_dashboards__dashboard_id__bundle_js_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/regenerate":{"post":{"tags":["dashboards"],"summary":"Regenerate Dashboard","description":"Regenerate a dashboard independently (without running finalize_steps).","operationId":"regenerate_dashboard_api_v1_dashboards__dashboard_id__regenerate_post","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Regenerate Dashboard Api V1 Dashboards  Dashboard Id  Regenerate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/versions":{"get":{"tags":["dashboard-versions"],"summary":"List Versions","description":"List all versions for a dashboard, newest first.","operationId":"list_versions_api_v1_dashboards__dashboard_id__versions_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard 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/DashboardVersionSummary"},"title":"Response List Versions Api V1 Dashboards  Dashboard Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/versions/{version_id}":{"get":{"tags":["dashboard-versions"],"summary":"Get Version","description":"Get a single version with full detail (including files).","operationId":"get_version_api_v1_dashboards__dashboard_id__versions__version_id__get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardVersionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboards/{dashboard_id}/versions/{version_id}/restore":{"post":{"tags":["dashboard-versions"],"summary":"Restore Version","description":"Restore a previous version as the current active version.","operationId":"restore_version_api_v1_dashboards__dashboard_id__versions__version_id__restore_post","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardVersionSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-chat/{chat_id}/message":{"post":{"tags":["dashboard-chat"],"summary":"Send Dashboard Chat Message","description":"Send a message to a dashboard-specific chat for targeted edits.","operationId":"send_dashboard_chat_message_api_v1_dashboard_chat__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Send Dashboard Chat Message Api V1 Dashboard Chat  Chat Id  Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-data/{dashboard_id}/pipelines":{"get":{"tags":["dashboard-data"],"summary":"Get Dashboard Pipelines Deprecated","description":"Deprecated — pipeline tables were dropped. Returns [].","operationId":"get_dashboard_pipelines_deprecated_api_v1_dashboard_data__dashboard_id__pipelines_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Dashboard Pipelines Deprecated Api V1 Dashboard Data  Dashboard Id  Pipelines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-data/{dashboard_id}/runs":{"get":{"tags":["dashboard-data"],"summary":"Get Dashboard Runs Deprecated","description":"Deprecated — pipeline_run table was dropped. Returns [].","operationId":"get_dashboard_runs_deprecated_api_v1_dashboard_data__dashboard_id__runs_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}},{"name":"pipeline_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Pipeline Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Dashboard Runs Deprecated Api V1 Dashboard Data  Dashboard Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-data/{dashboard_id}/pipelines/{pipeline_id}/runs":{"post":{"tags":["dashboard-data"],"summary":"Trigger Dashboard Pipeline Run Deprecated","description":"Deprecated — pipeline model is gone. Accepts the POST silently (202)\nso generated dashboard trigger buttons don't 500 the bundle; returns a\nstub response identifying this as a no-op. Frontend should move to the\nstep-based trigger endpoints.","operationId":"trigger_dashboard_pipeline_run_deprecated_api_v1_dashboard_data__dashboard_id__pipelines__pipeline_id__runs_post","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}},{"name":"pipeline_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Pipeline Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Dashboard Pipeline Run Deprecated Api V1 Dashboard Data  Dashboard Id  Pipelines  Pipeline Id  Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-data/{dashboard_id}/tables":{"get":{"tags":["dashboard-data"],"summary":"Get Dashboard Tables","description":"Return catalog of project databases + side tables with schemas.","operationId":"get_dashboard_tables_api_v1_dashboard_data__dashboard_id__tables_get","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Dashboard Tables Api V1 Dashboard Data  Dashboard Id  Tables Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard-data/{dashboard_id}/query":{"post":{"tags":["dashboard-data"],"summary":"Query Dashboard Data","description":"Execute SQL across all project databases + side tables.\n\n**DuckDB over each table's OWN storage — a `Database`'s Parquet, never an\nentity read.** A dashboard queries DATABASES: pipeline outputs, addressed\nby `display_name`, and pipelines write databases, not entities (of\nColisée's 1801 databases, 12 are promoted). `query_tables` registers each\nreferenced table independently as a `read_parquet` view and joins them in\none DuckDB session; per-table independence is the property that matters,\nbecause one un-promoted table among ten must not decide how the other nine\nare read.\n\n**Two paths were tried here and both are gone.** Routing the whole query\nthrough `entity_reads.oltp` resolved every identifier against `bindings`,\nwhich only an entity-backed table can appear in — so a single reference to\nan un-promoted table became `UnknownEntity` -> 400 for the entire query,\ni.e. for the overwhelming majority of what a dashboard reads (reverted in\n#791). And `query_tables` itself used to carry an entity branch that served\na promoted table from its DuckLake table; that went with DuckLake, and it\nis deliberately NOT replaced by the Parquet mirror. **Entities and\ndatabases are different storage, and this surface reads database\nstorage.**\n\nThe consequence, stated rather than discovered: a dashboard over a promoted\ntable reads the SOURCE image, so it does not reflect user edits, tombstones\nor managed columns — and a managed column exists ONLY in Postgres, so SQL\nnaming one fails with a missing-column error rather than returning stale\nvalues. A dashboard that needs an entity's edited view is asking for an\nentity read, which is what `/api/v1/ontology/entities/{id}/query` and the\napps query endpoint are for.","operationId":"query_dashboard_data_api_v1_dashboard_data__dashboard_id__query_post","parameters":[{"name":"dashboard_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Dashboard Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DataQueryResponse"},{"$ref":"#/components/schemas/PaginatedQueryResponse"}],"title":"Response Query Dashboard Data Api V1 Dashboard Data  Dashboard Id  Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/":{"get":{"tags":["apps"],"summary":"List Apps","description":"List apps the caller can see (VIEWER+). Owners see everything.","operationId":"list_apps_api_v1_apps__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppList"}}}}}},"post":{"tags":["apps"],"summary":"Create App","description":"Create a new app (draft).\n\nCompany-level gate (admin/owner) still applies — viewers cannot create\napps from nothing. The per-app ADMIN grant happens inside CreateApp.","operationId":"create_app_api_v1_apps__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}":{"get":{"tags":["apps"],"summary":"Get App","description":"Get a single app by ID.\n\nThe import map for the app's srcdoc iframe is built once from\n`bundle_imports`, before any bundle loads — so if this app embeds children,\nthe response must advertise the union of its own imports and theirs (see\n`union_embed_bundle_imports`). Applied here (and on version detail) only —\nNOT on the list endpoint, which would turn one page load into N extra\nqueries for imports no iframe is built from.","operationId":"get_app_api_v1_apps__app_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["apps"],"summary":"Update App","description":"Update an app's name or description.","operationId":"update_app_api_v1_apps__app_id__patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Delete App","description":"Soft-delete an app.","operationId":"delete_app_api_v1_apps__app_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/regenerate":{"post":{"tags":["apps"],"summary":"Regenerate App","description":"Regenerate an app's bundle independently (without running finalize_steps).\n\nRuns on the branch the caller NAMES, or — for a client that names none —\non their default work branch, auto-forked on first use. Never on `main`:\nlanding-only main admits no exception for the no-chat dispatch path,\nbecause a regenerate that wrote straight to main would put one editor's\nunreviewed build on the trunk while everyone else's branches sat behind it.","operationId":"regenerate_app_api_v1_apps__app_id__regenerate_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RegenerateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Regenerate App Api V1 Apps  App Id  Regenerate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/publish":{"post":{"tags":["apps"],"summary":"Publish Draft","description":"Promote the app's draft version to live.","operationId":"publish_draft_api_v1_apps__app_id__publish_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/chat":{"get":{"tags":["apps"],"summary":"Get App Chat","description":"The chat the caller should edit this app through.\n\nFor an EDITOR this is their DEFAULT branch's chat, auto-forked from main's\non first use (Phase 2) — that fork is what stops two editors sharing one\ntranscript and one SDK session. For a VIEWER it is main's chat, read-only:\ncreating a branch is an editing act, so a viewer opening the page must not\nsilently spawn one.\n\n\"Default\" is exact and not a hedge: an editor can hold several open work\nbranches, and this route takes no branch id, so it answers \"which chat do\nI open first\", not \"the caller's chat\". A client that has a specific branch\nin hand already holds its `chat_id` from `GET /branches` and should use\nthat. Unlike regenerate, guessing here costs a wrong default view rather\nthan a run dispatched onto the wrong branch, so it stays a default.","operationId":"get_app_chat_api_v1_apps__app_id__chat_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/favorite":{"put":{"tags":["apps"],"summary":"Favorite App","description":"Mark this app as a favourite for the current user (idempotent).\n\nPer-user state, but the caller still needs VIEWER on the resource —\ncompany membership alone would otherwise let any member toggle a\nfavourite on apps they cannot see, and use the 403-vs-404 response\nsplit to enumerate app IDs across the access boundary. The\npermission check runs **before** ``_load_app_or_404`` so a missing\ngrant collapses both \"doesn't exist\" and \"exists but inaccessible\"\ninto the same 403 for non-owners, matching ``get_app`` /\n``get_app_bundle`` and ``PUT /projects/{project_id}/favorite``.","operationId":"favorite_app_api_v1_apps__app_id__favorite_put","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Unfavorite App","description":"Unmark this app as a favourite for the current user (idempotent).\n\nSame VIEWER-before-load ordering as :func:`favorite_app` so the\nresponse code never leaks app existence across the access boundary.","operationId":"unfavorite_app_api_v1_apps__app_id__favorite_delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/bundle.js":{"get":{"tags":["apps"],"summary":"Get App Bundle","description":"Serve the app's JS bundle (proxied from S3).\n\n`embed_host_app_id` is set by `<EmbeddedApp>` in a host bundle: the child's\nbytes are served to anyone with VIEWER on the host plus a live binding.","operationId":"get_app_bundle_api_v1_apps__app_id__bundle_js_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/versions":{"get":{"tags":["apps"],"summary":"List Versions","description":"List all versions for an app, newest first.","operationId":"list_versions_api_v1_apps__app_id__versions_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App 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/AppVersionSummary"},"title":"Response List Versions Api V1 Apps  App Id  Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/versions/{version_id}":{"get":{"tags":["apps"],"summary":"Get Version","description":"Get a single version with full detail (including files).\n\nSource files / css / imports live in S3 (``v{N}/``) now, not on the row —\nwe read them back here so the response shape is unchanged for the FE.","operationId":"get_version_api_v1_apps__app_id__versions__version_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVersionDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Delete Version","description":"Delete a single draft version (row + S3 folder). Live version is protected.","operationId":"delete_version_api_v1_apps__app_id__versions__version_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/versions/{version_id}/restore":{"post":{"tags":["apps"],"summary":"Restore Version","description":"Restore a previous version as the current active version.","operationId":"restore_version_api_v1_apps__app_id__versions__version_id__restore_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppVersionSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/versions/{version_id}/bundle.js":{"get":{"tags":["apps"],"summary":"Get Version Bundle","description":"Serve a specific version's JS bundle (used to preview the draft).","operationId":"get_version_bundle_api_v1_apps__app_id__versions__version_id__bundle_js_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/versions/{version_id}/publish":{"post":{"tags":["apps"],"summary":"Publish Version","description":"Publish a specific version (draft or a prior published version) → live.","operationId":"publish_version_api_v1_apps__app_id__versions__version_id__publish_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/branches":{"get":{"tags":["apps"],"summary":"List Branches","operationId":"list_branches_api_v1_apps__app_id__branches_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppBranchRead"},"title":"Response List Branches Api V1 Apps  App Id  Branches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apps"],"summary":"Create Branch","operationId":"create_branch_api_v1_apps__app_id__branches_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppBranchRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/branches/{branch_id}/land":{"post":{"tags":["apps"],"summary":"Land Branch","description":"Fast-forward main to this branch's head.\n\nThe body is optional so a bodyless POST behaves exactly as before. Pass\n`expected_head_version_id` (the head the diff modal showed) to have the\nland refused with `branch_head_moved` if the branch moved under the user.","operationId":"land_branch_api_v1_apps__app_id__branches__branch_id__land_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LandBranchRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppBranchRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/branches/{branch_id}":{"delete":{"tags":["apps"],"summary":"Discard Branch","operationId":"discard_branch_api_v1_apps__app_id__branches__branch_id__delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/branches/{branch_id}/rebase":{"post":{"tags":["apps"],"summary":"Rebase Branch","description":"Replay this branch's work onto main's head — the run that makes a\ndiverged branch landable.\n\nAll three 409s are distinct states the frontend acts on differently:\nalready-current (nothing to do), main (never rebased), and busy (wait).","operationId":"rebase_branch_api_v1_apps__app_id__branches__branch_id__rebase_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Rebase Branch Api V1 Apps  App Id  Branches  Branch Id  Rebase Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/branches/{branch_id}/diff":{"get":{"tags":["apps"],"summary":"Diff Branch","description":"The diff the user approves before landing.\n\n`against` only accepts `main` today, and is a parameter rather than an\nimplicit assumption so a future branch-to-branch comparison is an added\nvalue rather than a changed route.","operationId":"diff_branch_api_v1_apps__app_id__branches__branch_id__diff_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"branch_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Branch Id"}},{"name":"against","in":"query","required":false,"schema":{"type":"string","default":"main","title":"Against"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppBranchDiff"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/query":{"post":{"tags":["apps-query"],"summary":"Run App Query","description":"Run a guarded SELECT against the app's bound ontology entities.","operationId":"run_app_query_api_v1_apps__app_id__query_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/query/batch":{"post":{"tags":["apps-query"],"summary":"Run App Query Batch","description":"Run several guarded SELECTs against the app's bound entities in one\nrequest with bounded, cancellation-aware DuckDB execution.\n\nApp-level failures (missing / not ready) return 404 / 409. Per-query\nfailures (bad SQL, DuckDB errors) are isolated into each result's\n``error`` field with HTTP 200 — one broken widget never blanks the page.","operationId":"run_app_query_batch_api_v1_apps__app_id__query_batch_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppQueryBatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppQueryBatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/scenarios":{"get":{"tags":["apps-scenarios"],"summary":"List App Scenarios","operationId":"list_app_scenarios_api_v1_apps__app_id__scenarios_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apps-scenarios"],"summary":"Create App Scenario","operationId":"create_app_scenario_api_v1_apps__app_id__scenarios_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/scenarios/{scenario_id}":{"get":{"tags":["apps-scenarios"],"summary":"Get App Scenario","operationId":"get_app_scenario_api_v1_apps__app_id__scenarios__scenario_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["apps-scenarios"],"summary":"Update App Scenario","operationId":"update_app_scenario_api_v1_apps__app_id__scenarios__scenario_id__patch","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/scenarios/{scenario_id}/revisions":{"get":{"tags":["apps-scenarios"],"summary":"List App Scenario Revisions","description":"List revisions newest-first, with an optional stable exclusive cursor.","operationId":"list_app_scenario_revisions_api_v1_apps__app_id__scenarios__scenario_id__revisions_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"before_revision_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Before Revision Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRevisionList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["apps-scenarios"],"summary":"Create App Scenario Revision","operationId":"create_app_scenario_revision_api_v1_apps__app_id__scenarios__scenario_id__revisions_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRevisionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRevisionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/scenarios/{scenario_id}/revisions/{revision_id}":{"get":{"tags":["apps-scenarios"],"summary":"Get App Scenario Revision","operationId":"get_app_scenario_revision_api_v1_apps__app_id__scenarios__scenario_id__revisions__revision_id__get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"scenario_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Scenario Id"}},{"name":"revision_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppScenarioRevisionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/automations/{automation_id}/binding":{"put":{"tags":["apps"],"summary":"Bind App Automation","description":"Idempotently allow one App to invoke one Automation.","operationId":"bind_app_automation_api_v1_apps__app_id__automations__automation_id__binding_put","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppAutomationBindingRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["apps"],"summary":"Unbind App Automation","description":"Revoke an App's invocation capability (idempotent).","operationId":"unbind_app_automation_api_v1_apps__app_id__automations__automation_id__binding_delete","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/automations/{automation_id}/run":{"post":{"tags":["apps"],"summary":"Run App Automation","operationId":"run_app_automation_api_v1_apps__app_id__automations__automation_id__run_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppAutomationRunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/file-targets":{"get":{"tags":["apps"],"summary":"List File Targets","operationId":"list_file_targets_api_v1_apps__app_id__file_targets_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppFileTargetSummary"},"title":"Response List File Targets Api V1 Apps  App Id  File Targets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/file-targets/{binding_id}/upload":{"post":{"tags":["apps"],"summary":"Upload To File Target","operationId":"upload_to_file_target_api_v1_apps__app_id__file_targets__binding_id__upload_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"binding_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Binding Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_to_file_target_api_v1_apps__app_id__file_targets__binding_id__upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/embeds":{"get":{"tags":["apps"],"summary":"List App Embeds","description":"List the apps embedded in this host. VIEWER on the host is enough —\nholding a grant on each child is exactly what the embed binding replaces.\n\n`embed_host_app_id` lets a middle app (itself embedded in an outer host)\nresolve its own embeds without the caller holding a direct grant on it —\nsee the module docstring.","operationId":"list_app_embeds_api_v1_apps__app_id__embeds_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppEmbedList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/entity-files/upload":{"post":{"tags":["apps"],"summary":"Upload Entity File","description":"Store a blob for a File cell. Omit `row_key` to attach to a row that does\nnot exist yet (an app's create form) — see the module docstring.","operationId":"upload_entity_file_api_v1_apps__app_id__entity_files_upload_post","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_entity_file_api_v1_apps__app_id__entity_files_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/apps/{app_id}/entity-files/{user_file_id}/download":{"get":{"tags":["apps"],"summary":"Download Entity File","operationId":"download_entity_file_api_v1_apps__app_id__entity_files__user_file_id__download_get","parameters":[{"name":"app_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"App Id"}},{"name":"user_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User File Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity-files/{file_id}":{"get":{"tags":["entity-files"],"summary":"Get Entity File Meta","description":"Name, extension, and size — what the compact File cell renders.\n\nCosts no S3 read. `/preview` is the only route that fetches bytes for a\nrendering decision.","operationId":"get_entity_file_meta_api_v1_entity_files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFileMeta"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity-files/{file_id}/download":{"get":{"tags":["entity-files"],"summary":"Download Entity File Any Lane","operationId":"download_entity_file_any_lane_api_v1_entity_files__file_id__download_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/entity-files/{file_id}/preview":{"get":{"tags":["entity-files"],"summary":"Preview Entity File","description":"How to render this file, decided from its BYTES.\n\n`kind: \"blob\"` — the only payload a client renders natively — is returned\nonly for magic-verified PDFs and images. Everything unrecognized, including\nanything markup-shaped, is `unsupported` and gets a download button.","operationId":"preview_entity_file_api_v1_entity_files__file_id__preview_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}},{"name":"app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},{"name":"embed_host_app_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}},{"name":"sheet","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheet"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityFilePreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/app-chat/{chat_id}/message":{"post":{"tags":["app-chat"],"summary":"Send App Chat Message","description":"Send a message to an app-specific chat for targeted edits.","operationId":"send_app_chat_message_api_v1_app_chat__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Send App Chat Message Api V1 App Chat  Chat Id  Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_type}/invoke":{"post":{"tags":["actions"],"summary":"Invoke Action","operationId":"invoke_action_api_v1_actions__action_type__invoke_post","parameters":[{"name":"action_type","in":"path","required":true,"schema":{"type":"string","title":"Action Type"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions":{"post":{"tags":["actions"],"summary":"Create Action","operationId":"create_action_api_v1_actions_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"title":"Response Create Action Api V1 Actions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["actions"],"summary":"List Actions","operationId":"list_actions_api_v1_actions_get","parameters":[{"name":"entity_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ActionSummary"},"title":"Response List Actions Api V1 Actions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/runnable":{"get":{"tags":["actions"],"summary":"List Runnable","operationId":"list_runnable_api_v1_actions_runnable_get","parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RunnableActionRead"},"title":"Response List Runnable Api V1 Actions Runnable Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/invocations":{"get":{"tags":["actions"],"summary":"List Invocations","operationId":"list_invocations_api_v1_actions_invocations_get","parameters":[{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvocationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/invoke":{"post":{"tags":["actions"],"summary":"Invoke Action Endpoint","operationId":"invoke_action_endpoint_api_v1_actions__action_id__invoke_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionInvokeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}":{"get":{"tags":["actions"],"summary":"Get Action","operationId":"get_action_api_v1_actions__action_id__get","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["actions"],"summary":"Update Action","operationId":"update_action_api_v1_actions__action_id__patch","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActionUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/actions/{action_id}/archive":{"post":{"tags":["actions"],"summary":"Archive Action","operationId":"archive_action_api_v1_actions__action_id__archive_post","parameters":[{"name":"action_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Action Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations":{"post":{"tags":["automations"],"summary":"Create Automation","operationId":"create_automation_api_v1_automations_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"title":"Response Create Automation Api V1 Automations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["automations"],"summary":"List Automations","operationId":"list_automations_api_v1_automations_get","parameters":[{"name":"include_suppressed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Suppressed"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AutomationRead"},"title":"Response List Automations Api V1 Automations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}":{"get":{"tags":["automations"],"summary":"Get Automation","operationId":"get_automation_api_v1_automations__automation_id__get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["automations"],"summary":"Update Automation","operationId":"update_automation_api_v1_automations__automation_id__patch","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/dataflow":{"get":{"tags":["automations"],"summary":"Get Automation Dataflow","description":"Per-node field availability + reference violations for the config editor.\n\nVIEWER-gated: this returns column *names* for entities the automation already\nreferences, at the same visibility as ``GET /{automation_id}`` (which returns the node\nconfigs naming those entities). No rows are read.","operationId":"get_automation_dataflow_api_v1_automations__automation_id__dataflow_get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataflowRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/result-datasets":{"post":{"tags":["automations"],"summary":"Create Automation Result Dataset","description":"Create an append-only, queryable dataset exclusively owned by an Automation.\n\nThe empty Parquet is materialized immediately so an owning App can safely\nquery the entity before the first run. Repeating the same request is\nidempotent; an incompatible schema for the same table name is rejected.","operationId":"create_automation_result_dataset_api_v1_automations__automation_id__result_datasets_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationResultDatasetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/favorite":{"put":{"tags":["automations"],"summary":"Favorite Automation","description":"Pin the workflow to the top of the caller's list. Idempotent; viewer+.","operationId":"favorite_automation_api_v1_automations__automation_id__favorite_put","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["automations"],"summary":"Unfavorite Automation","description":"Remove the workflow from the caller's favorites. Idempotent; viewer+.","operationId":"unfavorite_automation_api_v1_automations__automation_id__favorite_delete","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/nodes/{slug}/config":{"put":{"tags":["automations"],"summary":"Update Node Config","description":"Replace a node's ``config`` dict in place. Requires EDITOR on the automation.\n\nDelegates to ``workflow_architect.application.dag_edits.update_node_config`` —\nthe same primitive the architect chat uses — so validation rules stay aligned.","operationId":"update_node_config_api_v1_automations__automation_id__nodes__slug__config_put","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeConfigUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/nodes":{"post":{"tags":["automations"],"summary":"Add Automation Node","description":"Add one node. Requires EDITOR; delegates to the same primitive the architect uses.\n\nThe node is created unwired — POST ``/edges`` next. ``warnings`` carries the advisory\ndata-flow findings for the graph as it now stands (never blocking).","operationId":"add_automation_node_api_v1_automations__automation_id__nodes_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Automation Node Api V1 Automations  Automation Id  Nodes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/nodes/{slug}":{"delete":{"tags":["automations"],"summary":"Remove Automation Node","description":"Delete one node and its edges. Requires EDITOR.","operationId":"remove_automation_node_api_v1_automations__automation_id__nodes__slug__delete","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/edges":{"post":{"tags":["automations"],"summary":"Connect Automation Nodes","description":"Connect two nodes on a port (`default`, or `true`/`false` out of an `if`).","operationId":"connect_automation_nodes_api_v1_automations__automation_id__edges_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Connect Automation Nodes Api V1 Automations  Automation Id  Edges Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["automations"],"summary":"Disconnect Automation Nodes","description":"Remove one edge. Requires EDITOR.","operationId":"disconnect_automation_nodes_api_v1_automations__automation_id__edges_delete","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"from_slug","in":"query","required":true,"schema":{"type":"string","title":"From Slug"}},{"name":"to_slug","in":"query","required":true,"schema":{"type":"string","title":"To Slug"}},{"name":"port","in":"query","required":false,"schema":{"type":"string","default":"default","title":"Port"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/trigger":{"put":{"tags":["automations"],"summary":"Set Automation Trigger","description":"Swap the trigger kind/config in place (slug, id, and outgoing edges are preserved).","operationId":"set_automation_trigger_api_v1_automations__automation_id__trigger_put","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__automations__schemas__TriggerUpdate"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/suppress":{"post":{"tags":["automations"],"summary":"Suppress Automation","operationId":"suppress_automation_api_v1_automations__automation_id__suppress_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/unsuppress":{"post":{"tags":["automations"],"summary":"Unsuppress Automation","description":"Restore a suppressed automation. If the row was ACTIVE before suppress\n(suppress only flips ``is_suppressed`` — status stays as it was), this\nendpoint also re-registers the Temporal schedule that ``suppress`` deleted.\nWithout that, the row sits ACTIVE forever with no backing schedule and\nnever fires again.","operationId":"unsuppress_automation_api_v1_automations__automation_id__unsuppress_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/activate":{"post":{"tags":["automations"],"summary":"Activate Automation","operationId":"activate_automation_api_v1_automations__automation_id__activate_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/deactivate":{"post":{"tags":["automations"],"summary":"Deactivate Automation","operationId":"deactivate_automation_api_v1_automations__automation_id__deactivate_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/run":{"post":{"tags":["automations"],"summary":"Run Automation Now","operationId":"run_automation_now_api_v1_automations__automation_id__run_post","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AutomationRunRequest"},{"type":"null"}],"title":"Payload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunNowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/runs":{"get":{"tags":["automations"],"summary":"List Automation Runs","operationId":"list_automation_runs_api_v1_automations__automation_id__runs_get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/domains__automations__schemas__RunRead"},"title":"Response List Automation Runs Api V1 Automations  Automation Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/automations/{automation_id}/runs/{run_id}":{"get":{"tags":["automations"],"summary":"Get Automation Run","operationId":"get_automation_run_api_v1_automations__automation_id__runs__run_id__get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunDetailRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/":{"post":{"tags":["databases"],"summary":"Create Database","description":"Create a new database record (metadata only, no Parquet yet).","operationId":"create_database_api_v1_databases__post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["databases"],"summary":"List Databases","description":"List databases, optionally filtered by project.","operationId":"list_databases_api_v1_databases__get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatabaseRead"},"title":"Response List Databases Api V1 Databases  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/{database_id}":{"get":{"tags":["databases"],"summary":"Get Database","description":"Get a single database by ID.","operationId":"get_database_api_v1_databases__database_id__get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["databases"],"summary":"Update Database","description":"Update a database's name, description, schema, or sharing.","operationId":"update_database_api_v1_databases__database_id__patch","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["databases"],"summary":"Delete Database","description":"Hard-delete a database and its Parquet file.","operationId":"delete_database_api_v1_databases__database_id__delete","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/{database_id}/preview":{"get":{"tags":["databases"],"summary":"Preview Database","description":"Preview first N rows of a database.","operationId":"preview_database_api_v1_databases__database_id__preview_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/{database_id}/query":{"get":{"tags":["databases"],"summary":"Query Database","description":"Run a DuckDB SQL query against the database's Parquet data.","operationId":"query_database_api_v1_databases__database_id__query_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"sql","in":"query","required":true,"schema":{"type":"string","description":"SQL query (table is named 'data')","title":"Sql"},"description":"SQL query (table is named 'data')"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/{database_id}/nl_query":{"post":{"tags":["databases"],"summary":"Nl Query Database","description":"Translate a natural-language question into DuckDB SQL and execute it.","operationId":"nl_query_database_api_v1_databases__database_id__nl_query_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"default":1000,"title":"Limit"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/databases/{database_id}/refresh":{"post":{"tags":["databases"],"summary":"Refresh Database","description":"Refresh this Database. Cascade to children fires automatically.\n\n``force_full=true`` requests a full rebuild (ignore incremental\nwatermarks). Honored for project-owned datasets, where it is persisted\non the dispatched Run; integration-owned (crawler) refreshes always\nre-poll the source and ignore the flag.\n\n- Integration-owned (data lake table): signal the crawler workflow to poll\n  that integration. ``_update_database_stats`` then fires\n  ``trigger_dependent_steps`` for the children once the poll completes.\n- Project-owned: dispatch a Run rooted at the producing data_sink, which\n  walks the project's own ancestor closure (parents are NOT re-run —\n  the data_read step uses upstream data as it stands today). The run's\n  terminal phase fires ``trigger_dependent_steps`` for the children.\n- File-backed / unbacked: cannot be refreshed (400).","operationId":"refresh_database_api_v1_databases__database_id__refresh_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}},{"name":"force_full","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Full"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Refresh Database Api V1 Databases  Database Id  Refresh Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/databases":{"get":{"tags":["ontology"],"summary":"List Ontology Databases","description":"List all shared databases in the company (the ontology), plus user's own non-shared ones.","operationId":"list_ontology_databases_api_v1_ontology_databases_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OntologyDatabaseRead"},"type":"array","title":"Response List Ontology Databases Api V1 Ontology Databases Get"}}}}}}},"/api/v1/ontology/databases/{database_id}/cascade":{"get":{"tags":["ontology"],"summary":"Get Database Cascade Dependencies","description":"List all steps that will be triggered when this database refreshes.","operationId":"get_database_cascade_dependencies_api_v1_ontology_databases__database_id__cascade_get","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CascadeDependency"},"title":"Response Get Database Cascade Dependencies Api V1 Ontology Databases  Database Id  Cascade Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/databases/{database_id}":{"delete":{"tags":["ontology"],"summary":"Delete Ontology Database","description":"Delete a database if it is not used by any active steps.","operationId":"delete_ontology_database_api_v1_ontology_databases__database_id__delete","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/graph":{"get":{"tags":["ontology"],"summary":"Get Ontology Graph","description":"Return the company-wide dataset dependency graph (nodes + edges).","operationId":"get_ontology_graph_api_v1_ontology_graph_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyGraphRead"}}}}}}},"/api/v1/ontology/cascade-mutes":{"post":{"tags":["ontology"],"summary":"Create Cascade Mute","description":"Mute the auto-cascade for one (source, target, project) edge.","operationId":"create_cascade_mute_api_v1_ontology_cascade_mutes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CascadeEdgeMuteCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CascadeEdgeMuteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/cascade-mutes/{mute_id}":{"delete":{"tags":["ontology"],"summary":"Delete Cascade Mute","description":"Resume cascade — hard-delete the mute row.","operationId":"delete_cascade_mute_api_v1_ontology_cascade_mutes__mute_id__delete","parameters":[{"name":"mute_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Mute Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities":{"get":{"tags":["ontology-entities"],"summary":"List Entities","description":"List all entities the caller can see (VIEWER+). Owners see everything.","operationId":"list_entities_api_v1_ontology_entities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/domains__ontology__schemas__EntityRead"},"type":"array","title":"Response List Entities Api V1 Ontology Entities Get"}}}}}},"post":{"tags":["ontology-entities"],"summary":"Create Managed Entity","description":"Create an entity with no source dataset (entity from nothing).","operationId":"create_managed_entity_api_v1_ontology_entities_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManagedEntityBody"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__ontology__schemas__EntityRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entity-graph":{"get":{"tags":["ontology-entities"],"summary":"Get Entity Graph","description":"Company entity graph (nodes = entities, edges = relationships).\n\nPath is ``/entity-graph`` rather than ``/entities/graph`` so it does not\ncollide with ``GET /entities/{entity_id}`` (which would parse ``graph`` as a\nUUID). Permission-filtered to VIEWER+ accessible entities.","operationId":"get_entity_graph_api_v1_ontology_entity_graph_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityGraphRead"}}}}}}},"/api/v1/ontology/entities/{entity_id}":{"get":{"tags":["ontology-entities"],"summary":"Get Entity","description":"Get entity detail with properties, relationships, and fed-by projects.","operationId":"get_entity_api_v1_ontology_entities__entity_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__ontology__schemas__EntityRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ontology-entities"],"summary":"Update Entity","description":"Update entity display_name or description.","operationId":"update_entity_api_v1_ontology_entities__entity_id__patch","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__ontology__schemas__EntityRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ontology-entities"],"summary":"Archive Entity","description":"Archive an entity (soft-delete).","operationId":"archive_entity_api_v1_ontology_entities__entity_id__delete","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/properties":{"get":{"tags":["ontology-entities"],"summary":"List Properties","description":"List properties for an entity.","operationId":"list_properties_api_v1_ontology_entities__entity_id__properties_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityPropertyRead"},"title":"Response List Properties Api V1 Ontology Entities  Entity Id  Properties Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ontology-entities"],"summary":"Update Properties","description":"Bulk update property display names, descriptions, and order.","operationId":"update_properties_api_v1_ontology_entities__entity_id__properties_patch","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyBulkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityPropertyRead"},"title":"Response Update Properties Api V1 Ontology Entities  Entity Id  Properties Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ontology-entities"],"summary":"Create Managed Property","description":"Add a managed (admin-defined) property to an entity.","operationId":"create_managed_property_api_v1_ontology_entities__entity_id__properties_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagedPropertyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityPropertyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/properties/{property_id}":{"delete":{"tags":["ontology-entities"],"summary":"Delete Managed Property","description":"Remove a managed property from an entity (source-origin properties are rejected).","operationId":"delete_managed_property_api_v1_ontology_entities__entity_id__properties__property_id__delete","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"property_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Property Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/properties/preview-rules":{"post":{"tags":["ontology-entities"],"summary":"Preview Field Rules","description":"Count existing rows that would violate the candidate field rules (no data is changed).","operationId":"preview_field_rules_api_v1_ontology_entities__entity_id__properties_preview_rules_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RulesPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/relationships":{"get":{"tags":["ontology-relationships"],"summary":"List Relationships","description":"List all relationships for the company.","operationId":"list_relationships_api_v1_ontology_relationships_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RelationshipRead"},"type":"array","title":"Response List Relationships Api V1 Ontology Relationships Get"}}}}}},"post":{"tags":["ontology-relationships"],"summary":"Create Relationship","description":"Manually create a relationship (and its inverse). Requires admin/owner.","operationId":"create_relationship_api_v1_ontology_relationships_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/relationships":{"get":{"tags":["ontology-relationships"],"summary":"List Entity Relationships","description":"List relationships for one entity (both directions).","operationId":"list_entity_relationships_api_v1_ontology_entities__entity_id__relationships_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelationshipRead"},"title":"Response List Entity Relationships Api V1 Ontology Entities  Entity Id  Relationships Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/relationships/{relationship_id}":{"patch":{"tags":["ontology-relationships"],"summary":"Update Relationship","description":"Update relationship name, type, or description. Requires admin/owner.","operationId":"update_relationship_api_v1_ontology_relationships__relationship_id__patch","parameters":[{"name":"relationship_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Relationship Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationshipRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ontology-relationships"],"summary":"Delete Relationship","description":"Delete a relationship and its paired inverse. Requires admin/owner.","operationId":"delete_relationship_api_v1_ontology_relationships__relationship_id__delete","parameters":[{"name":"relationship_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Relationship Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/related":{"get":{"tags":["ontology-traversal"],"summary":"Get Related Entities","description":"Get the connected entity subgraph from this entity.","operationId":"get_related_entities_api_v1_ontology_entities__entity_id__related_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RelatedEntity"},"title":"Response Get Related Entities Api V1 Ontology Entities  Entity Id  Related Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/records":{"get":{"tags":["ontology-records"],"summary":"List Records","operationId":"list_records_api_v1_ontology_entities__entity_id__records_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"sort_dir","in":"query","required":false,"schema":{"type":"string","default":"asc","title":"Sort Dir"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Records Api V1 Ontology Entities  Entity Id  Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{from_entity_id}/unmatched/{to_entity_id}":{"get":{"tags":["ontology-records"],"summary":"List Unmatched Records","operationId":"list_unmatched_records_api_v1_ontology_entities__from_entity_id__unmatched__to_entity_id__get","parameters":[{"name":"from_entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"From Entity Id"}},{"name":"to_entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"To Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"filter_via","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter from_entity to only keys reachable from this entity","title":"Filter Via"},"description":"Filter from_entity to only keys reachable from this entity"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Unmatched Records Api V1 Ontology Entities  From Entity Id  Unmatched  To Entity Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{from_entity_id}/matched/{to_entity_id}":{"get":{"tags":["ontology-records"],"summary":"List Matched Records","operationId":"list_matched_records_api_v1_ontology_entities__from_entity_id__matched__to_entity_id__get","parameters":[{"name":"from_entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"From Entity Id"}},{"name":"to_entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"To Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"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":"object","additionalProperties":true,"title":"Response List Matched Records Api V1 Ontology Entities  From Entity Id  Matched  To Entity Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/records/{record_key}/related":{"get":{"tags":["ontology-records"],"summary":"Get Record Related","operationId":"get_record_related_api_v1_ontology_entities__entity_id__records__record_key__related_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"record_key","in":"path","required":true,"schema":{"type":"string","title":"Record Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordRelatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/rows":{"get":{"tags":["ontology-rows"],"summary":"List Rows","description":"List merged rows (source ⊕ overlay) for an entity, paginated.\n\nApplies row-policy RLS so non-owner users only see rows their policies\nallow — same enforcement as ``/records``.","operationId":"list_rows_api_v1_ontology_entities__entity_id__rows_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ontology-rows"],"summary":"Insert Row","description":"Insert a row — routed through the entity's default create Action.","operationId":"insert_row_api_v1_ontology_entities__entity_id__rows_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowInsert"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/rows/{row_key}":{"get":{"tags":["ontology-rows"],"summary":"Get Row","description":"Fetch a single merged row by key (source ⊕ overlay), RLS-applied.\n\nPowers \"open this row\" links (e.g. the action audit trail). 404 when the\nrow is tombstoned, RLS-hidden, or unknown.","operationId":"get_row_api_v1_ontology_entities__entity_id__rows__row_key__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"row_key","in":"path","required":true,"schema":{"type":"string","title":"Row Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ontology-rows"],"summary":"Patch Row","description":"Patch a row — routed through the entity's default modify Action.","operationId":"patch_row_api_v1_ontology_entities__entity_id__rows__row_key__patch","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"row_key","in":"path","required":true,"schema":{"type":"string","title":"Row Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityRowRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ontology-rows"],"summary":"Delete Row","description":"Tombstone a row — routed through the entity's default delete Action.","operationId":"delete_row_api_v1_ontology_entities__entity_id__rows__row_key__delete","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"row_key","in":"path","required":true,"schema":{"type":"string","title":"Row Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/sync":{"post":{"tags":["ontology-rows"],"summary":"Sync Entity","description":"Trigger a source sync for the entity.\n\nWrite-gated: sync triggers a DuckDB scan over S3, which is expensive\nenough that low-privilege viewers shouldn't be able to fire it in a\ntight loop.  Same write-role guard the other row endpoints use.","operationId":"sync_entity_api_v1_ontology_entities__entity_id__sync_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitySyncStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/query":{"post":{"tags":["ontology-query"],"summary":"Query Entities","description":"Execute a natural language query over the entity ontology.","operationId":"query_entities_api_v1_ontology_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Query Entities Api V1 Ontology Query Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/nl_query":{"post":{"tags":["ontology-query"],"summary":"Nl Query Entity","description":"Translate a question into DuckDB SQL over this entity + its 2-hop closure.","operationId":"nl_query_entity_api_v1_ontology_entities__entity_id__nl_query_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityNLQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/query":{"get":{"tags":["ontology-query"],"summary":"Sql Query Entity","description":"Run caller-authored SQL over this entity + its 2-hop closure.","operationId":"sql_query_entity_api_v1_ontology_entities__entity_id__query_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"sql","in":"query","required":true,"schema":{"type":"string","description":"Read-only DuckDB SQL; tables are entity names","title":"Sql"},"description":"Read-only DuckDB SQL; tables are entity names"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"default":1000,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/chats/{chat_id}/message":{"post":{"tags":["ontology-chat"],"summary":"Ontology Chat Message","description":"Send a message to the ontology design advisor.","operationId":"ontology_chat_message_api_v1_ontology_chats__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyChatMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OntologyChatMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/databases/{database_id}/promote":{"post":{"tags":["ontology-promotion"],"summary":"Promote Database","description":"Promote a Database into an OntologyEntity (creates the writeable surface).","operationId":"promote_database_api_v1_ontology_databases__database_id__promote_post","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Database Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__ontology__schemas__EntityRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/demote":{"post":{"tags":["ontology-promotion"],"summary":"Demote Entity","description":"Tear down an OntologyEntity, leaving its underlying Database intact.\n\nRefuses with 409 when overlays exist — caller must clear them first.","operationId":"demote_entity_api_v1_ontology_entities__entity_id__demote_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ontology/entities/{entity_id}/clear-overlays":{"post":{"tags":["ontology-promotion"],"summary":"Clear Overlays","description":"Type-to-confirm wipe of every overlay row for an entity.","operationId":"clear_overlays_api_v1_ontology_entities__entity_id__clear_overlays_post","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/":{"get":{"tags":["api-keys"],"summary":"List Api Keys","description":"List the caller's API keys — summaries only.","operationId":"list_api_keys_api_v1_api_keys__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyRead"},"type":"array","title":"Response List Api Keys Api V1 Api Keys  Get"}}}}}},"post":{"tags":["api-keys"],"summary":"Create Api Key","description":"Mint a new API key. The plaintext secret is returned ONCE.","operationId":"create_api_key_api_v1_api_keys__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}":{"delete":{"tags":["api-keys"],"summary":"Revoke Api Key","description":"Soft-revoke an API key (is_active → False).","operationId":"revoke_api_key_api_v1_api_keys__key_id__delete","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/monitoring/":{"get":{"tags":["monitoring"],"summary":"Get Monitoring Overview","description":"Return a centralised monitoring overview for the company.","operationId":"get_monitoring_overview_api_v1_monitoring__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringOverview"}}}}}}},"/api/v1/monitoring/insights":{"get":{"tags":["monitoring"],"summary":"Get Monitoring Insights","description":"Return AI-native actionable insights for the company.","operationId":"get_monitoring_insights_api_v1_monitoring_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringInsights"}}}}}}},"/api/v1/permissions/resource/{resource_type}/{resource_id}":{"get":{"tags":["permissions"],"summary":"List Resource Permissions","description":"List all permissions on a resource. Requires admin.","operationId":"list_resource_permissions_api_v1_permissions_resource__resource_type___resource_id__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ResourceType"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRead"},"title":"Response List Resource Permissions Api V1 Permissions Resource  Resource Type   Resource Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["permissions"],"summary":"Grant Resource Permission","description":"Grant a permission on a resource to a user or group. Requires admin.","operationId":"grant_resource_permission_api_v1_permissions_resource__resource_type___resource_id__post","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ResourceType"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionGrant"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/resource/{resource_type}/{resource_id}/{grantee_type}/{grantee_id}":{"patch":{"tags":["permissions"],"summary":"Update Resource Permission","description":"Update a grantee's permission level on a resource. Requires admin.","operationId":"update_resource_permission_api_v1_permissions_resource__resource_type___resource_id___grantee_type___grantee_id__patch","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ResourceType"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"grantee_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GranteeType"}},{"name":"grantee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Grantee Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["permissions"],"summary":"Revoke Resource Permission","description":"Revoke a grantee's permission on a resource. Requires admin.","operationId":"revoke_resource_permission_api_v1_permissions_resource__resource_type___resource_id___grantee_type___grantee_id__delete","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ResourceType"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}},{"name":"grantee_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GranteeType"}},{"name":"grantee_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Grantee Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/user/{target_user_id}":{"get":{"tags":["permissions"],"summary":"List User Permissions","description":"List all permissions for a user with resource names. Requires owner.\n\nIncludes both direct user grants and grants via the user's effective\ngroups. Role check lives inside\n:class:`ListUserPermissions.execute_with_names` — raises\n:class:`PermissionDenied` (→ HTTP 403) when the caller isn't an owner.","operationId":"list_user_permissions_api_v1_permissions_user__target_user_id__get","parameters":[{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPermissionRead"},"title":"Response List User Permissions Api V1 Permissions User  Target User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/my":{"get":{"tags":["permissions"],"summary":"List My Permissions","description":"List all permissions granted to the current user (direct + group grants).","operationId":"list_my_permissions_api_v1_permissions_my_get","parameters":[{"name":"resource_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ResourceType"},{"type":"null"}],"title":"Resource Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRead"},"title":"Response List My Permissions Api V1 Permissions My Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/permissions/effective/{resource_type}/{resource_id}":{"get":{"tags":["permissions"],"summary":"Effective Access","description":"Every user's effective level on the resource, with provenance — feeds the share panel.\n\nReturns one entry per user who has any access (direct or via group/ancestor),\nwith the contributing grant paths and whether each path is data-flow-capped.\nRequires ADMIN on the resource.","operationId":"effective_access_api_v1_permissions_effective__resource_type___resource_id__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ResourceType"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EffectiveAccessEntry"},"title":"Response Effective Access Api V1 Permissions Effective  Resource Type   Resource Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/row-policies/{resource_type}/{resource_id}":{"get":{"tags":["row-policies"],"summary":"List Row Access Policies","description":"List all RLS rules for a resource. Requires ADMIN on the resource.","operationId":"list_row_access_policies_api_v1_row_policies__resource_type___resource_id__get","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RowAccessPolicyRead"},"title":"Response List Row Access Policies Api V1 Row Policies  Resource Type   Resource Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["row-policies"],"summary":"Create Row Access Policy","description":"Create an RLS rule for a resource. Requires ADMIN on the resource.","operationId":"create_row_access_policy_api_v1_row_policies__resource_type___resource_id__post","parameters":[{"name":"resource_type","in":"path","required":true,"schema":{"type":"string","title":"Resource Type"}},{"name":"resource_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Resource Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowAccessPolicyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowAccessPolicyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/row-policies/policy/{policy_id}":{"patch":{"tags":["row-policies"],"summary":"Update Row Access Policy","description":"Update an RLS rule's operator, values, or attribute_key. Requires ADMIN on the resource.","operationId":"update_row_access_policy_api_v1_row_policies_policy__policy_id__patch","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Policy Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowAccessPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RowAccessPolicyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["row-policies"],"summary":"Delete Row Access Policy","description":"Delete an RLS rule. Requires ADMIN on the resource.","operationId":"delete_row_access_policy_api_v1_row_policies_policy__policy_id__delete","parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Policy Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes":{"get":{"tags":["attributes"],"summary":"List Attribute Definitions","description":"List all attribute definitions for the company.","operationId":"list_attribute_definitions_api_v1_attributes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AttributeDefinitionRead"},"type":"array","title":"Response List Attribute Definitions Api V1 Attributes Get"}}}}}},"post":{"tags":["attributes"],"summary":"Create Attribute Definition","description":"Create an attribute definition. Requires company admin.","operationId":"create_attribute_definition_api_v1_attributes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeDefinitionCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeDefinitionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes/{definition_id}":{"patch":{"tags":["attributes"],"summary":"Update Attribute Definition","description":"Update an attribute definition's label. Requires company admin.","operationId":"update_attribute_definition_api_v1_attributes__definition_id__patch","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeDefinitionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["attributes"],"summary":"Delete Attribute Definition","description":"Delete an attribute definition. Requires company admin.","operationId":"delete_attribute_definition_api_v1_attributes__definition_id__delete","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes/members/{user_id}":{"get":{"tags":["attributes"],"summary":"Get Member Attributes","description":"Get attribute values for a company member. Requires company admin.","operationId":"get_member_attributes_api_v1_attributes_members__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAttributesRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["attributes"],"summary":"Set Member Attributes","description":"Set attribute values for a company member. Requires company admin.","operationId":"set_member_attributes_api_v1_attributes_members__user_id__put","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAttributesWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAttributesRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes/automation/entities/{entity_id}/columns":{"get":{"tags":["attributes"],"summary":"Get Automation Entity Columns","description":"List dataset columns available for matching/value for a given entity.","operationId":"get_automation_entity_columns_api_v1_attributes_automation_entities__entity_id__columns_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Automation Entity Columns Api V1 Attributes Automation Entities  Entity Id  Columns Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes/{definition_id}/automation":{"get":{"tags":["attributes"],"summary":"Get Attribute Automation","description":"Get the automation rule for an attribute definition, or None if not configured.","operationId":"get_attribute_automation_api_v1_attributes__definition_id__automation_get","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AttributeAutomationRead"},{"type":"null"}],"title":"Response Get Attribute Automation Api V1 Attributes  Definition Id  Automation Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["attributes"],"summary":"Put Attribute Automation","description":"Configure (upsert) an automation rule and run an initial sync.","operationId":"put_attribute_automation_api_v1_attributes__definition_id__automation_put","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeAutomationWrite"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeAutomationConfigured"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["attributes"],"summary":"Delete Attribute Automation Rule","description":"Disable the automation rule for an attribute definition.","operationId":"delete_attribute_automation_rule_api_v1_attributes__definition_id__automation_delete","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/attributes/{definition_id}/automation/sync":{"post":{"tags":["attributes"],"summary":"Sync Attribute Automation","description":"Trigger an on-demand sync for an attribute automation rule.","operationId":"sync_attribute_automation_api_v1_attributes__definition_id__automation_sync_post","parameters":[{"name":"definition_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Definition Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeSyncStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups":{"get":{"tags":["groups"],"summary":"List Groups","description":"List all groups for the company. Available to any company member.","operationId":"list_groups_api_v1_groups_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GroupRead"},"type":"array","title":"Response List Groups Api V1 Groups Get"}}}}}},"post":{"tags":["groups"],"summary":"Create Group","description":"Create a group. Requires company admin.","operationId":"create_group_api_v1_groups_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}":{"patch":{"tags":["groups"],"summary":"Update Group","description":"Update a group's name, description, or rule. Requires company admin.","operationId":"update_group_api_v1_groups__group_id__patch","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["groups"],"summary":"Delete Group","description":"Delete a group. Requires company admin.","operationId":"delete_group_api_v1_groups__group_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/members":{"get":{"tags":["groups"],"summary":"Get Group Members","description":"Get manual and effective members of a group. Requires company admin.","operationId":"get_group_members_api_v1_groups__group_id__members_get","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}/members/{user_id}":{"post":{"tags":["groups"],"summary":"Add Group Member","description":"Add a manual member to a group. Requires company admin.","operationId":"add_group_member_api_v1_groups__group_id__members__user_id__post","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["groups"],"summary":"Remove Group Member","description":"Remove a manual member from a group. Requires company admin.","operationId":"remove_group_member_api_v1_groups__group_id__members__user_id__delete","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/operators/":{"get":{"tags":["operators"],"summary":"List Operators","description":"Return the full operator catalog (names, schemas, DAG rules).","operationId":"list_operators_api_v1_operators__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Operators Api V1 Operators  Get"}}}}}}},"/api/v1/lego-architect/projects/{project_id}/chat":{"get":{"tags":["lego-architect"],"summary":"Get Or Create Chat","description":"Get or create the lego-architect chat for this project.","operationId":"get_or_create_chat_api_v1_lego_architect_projects__project_id__chat_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Or Create Chat Api V1 Lego Architect Projects  Project Id  Chat Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lego-architect/{chat_id}/message":{"post":{"tags":["lego-architect"],"summary":"Send Message","description":"Dispatch a new lego-architect turn for this chat.","operationId":"send_message_api_v1_lego_architect__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegoMessageRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegoTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lego-architect/projects/{project_id}/steps":{"post":{"tags":["lego-architect"],"summary":"Add Step","operationId":"add_step_api_v1_lego_architect_projects__project_id__steps_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddStepRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Step Api V1 Lego Architect Projects  Project Id  Steps Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lego-architect/projects/{project_id}/steps/{slug}":{"patch":{"tags":["lego-architect"],"summary":"Update Step","operationId":"update_step_api_v1_lego_architect_projects__project_id__steps__slug__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Step Api V1 Lego Architect Projects  Project Id  Steps  Slug  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["lego-architect"],"summary":"Remove Step","operationId":"remove_step_api_v1_lego_architect_projects__project_id__steps__slug__delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Step Api V1 Lego Architect Projects  Project Id  Steps  Slug  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lego-architect/projects/{project_id}/edges":{"post":{"tags":["lego-architect"],"summary":"Link Step","operationId":"link_step_api_v1_lego_architect_projects__project_id__edges_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Link Step Api V1 Lego Architect Projects  Project Id  Edges Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["lego-architect"],"summary":"Unlink Step","description":"Remove a parent → child edge. Takes `parent_slug` + `child_slug` as query params.","operationId":"unlink_step_api_v1_lego_architect_projects__project_id__edges_delete","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"parent_slug","in":"query","required":true,"schema":{"type":"string","title":"Parent Slug"}},{"name":"child_slug","in":"query","required":true,"schema":{"type":"string","title":"Child Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Unlink Step Api V1 Lego Architect Projects  Project Id  Edges Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/":{"get":{"tags":["steps"],"summary":"List Steps","description":"List steps, optionally filtered by project.","operationId":"list_steps_api_v1_steps__get","parameters":[{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StepRead"},"title":"Response List Steps Api V1 Steps  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["steps"],"summary":"Create Step","operationId":"create_step_api_v1_steps__post","parameters":[{"name":"project_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}":{"get":{"tags":["steps"],"summary":"Get Step","operationId":"get_step_api_v1_steps__step_id__get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["steps"],"summary":"Update Step","operationId":"update_step_api_v1_steps__step_id__patch","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["steps"],"summary":"Delete Step","operationId":"delete_step_api_v1_steps__step_id__delete","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/code":{"get":{"tags":["steps"],"summary":"Get Step Code","description":"Serve step code from S3.","operationId":"get_step_code_api_v1_steps__step_id__code_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Step Code Api V1 Steps  Step Id  Code Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["steps"],"summary":"Update Step Code","description":"Verbatim-save a custom_code step's Python source to S3.","operationId":"update_step_code_api_v1_steps__step_id__code_put","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCodeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Step Code Api V1 Steps  Step Id  Code Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/suppress":{"post":{"tags":["steps"],"summary":"Suppress Step","description":"Soft-delete a step. Deactivates its trigger if any.","operationId":"suppress_step_api_v1_steps__step_id__suppress_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/project/{project_id}/batch":{"put":{"tags":["steps"],"summary":"Batch Replace Steps","description":"Replace all steps in a project (deploy-time).","operationId":"batch_replace_steps_api_v1_steps_project__project_id__batch_put","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepBatchReplace"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StepRead"},"title":"Response Batch Replace Steps Api V1 Steps Project  Project Id  Batch Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/project/{project_id}/validate":{"post":{"tags":["steps"],"summary":"Validate Project Dag","description":"Validate the current step DAG for a project.","operationId":"validate_project_dag_api_v1_steps_project__project_id__validate_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Validate Project Dag Api V1 Steps Project  Project Id  Validate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/swap-candidates":{"get":{"tags":["steps"],"summary":"Get Swap Candidates","operationId":"get_swap_candidates_api_v1_steps__step_id__swap_candidates_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapCandidateList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/swap-input":{"post":{"tags":["steps"],"summary":"Post Swap Input","operationId":"post_swap_input_api_v1_steps__step_id__swap_input_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapInputRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapInputResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/trigger":{"post":{"tags":["steps"],"summary":"Create Trigger","operationId":"create_trigger_api_v1_steps__step_id__trigger_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["steps"],"summary":"Update Trigger","operationId":"update_trigger_api_v1_steps__step_id__trigger_patch","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__pipelines__schemas__TriggerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["steps"],"summary":"Delete Trigger","operationId":"delete_trigger_api_v1_steps__step_id__trigger_delete","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/project/{project_id}/run":{"post":{"tags":["steps"],"summary":"Trigger Run","description":"Trigger a new run for a project.\n\n- root_step_id=None → run all active steps (Run All).\n- root_step_id=<id> → refresh that output: runs its ancestor closure back to roots.\n  The target must be a ``database`` step.","operationId":"trigger_run_api_v1_steps_project__project_id__run_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__pipelines__schemas__RunRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/project/{project_id}/runs":{"get":{"tags":["steps"],"summary":"List Runs","description":"List recent runs for a project.","operationId":"list_runs_api_v1_steps_project__project_id__runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/domains__pipelines__schemas__RunRead"},"title":"Response List Runs Api V1 Steps Project  Project Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/run/{run_id}":{"get":{"tags":["steps"],"summary":"Get Run","description":"Get run details including step runs.\n\n``auth`` is declared to enforce authentication via FastAPI's dependency\nsystem; the project-perm check is resolved against the run's own company\nso multi-company users polling a run (e.g. dashboard InputForm) are not\n404'd when their selected ``X-Company-ID`` differs from ``run.company_id``.","operationId":"get_run_api_v1_steps_run__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__pipelines__schemas__RunRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/run/{run_id}/cancel":{"post":{"tags":["steps"],"summary":"Cancel Run","description":"Cancel a running DAG execution.","operationId":"cancel_run_api_v1_steps_run__run_id__cancel_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Run Api V1 Steps Run  Run Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/auto-fix":{"post":{"tags":["steps"],"summary":"Auto Fix Step","description":"Dispatch an auto-fix job for a failed step.\n\nFinds the most recent failed StepRun and sends error context to the agent\nfor automatic code repair.","operationId":"auto_fix_step_api_v1_steps__step_id__auto_fix_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/join-advisor-chat":{"get":{"tags":["join-advisor"],"summary":"Get Join Advisor Chat","description":"Return the existing join advisor chat for a step, or 404.","operationId":"get_join_advisor_chat_api_v1_steps__step_id__join_advisor_chat_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Join Advisor Chat Api V1 Steps  Step Id  Join Advisor Chat Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/join-advisor":{"post":{"tags":["join-advisor"],"summary":"Start Join Advisor","description":"Start a Join Advisor session for a join operator step.\n\nValidates the step is a join operator, finds the latest successful run,\ncreates or reuses an advisor chat, and dispatches the agent task.","operationId":"start_join_advisor_api_v1_steps__step_id__join_advisor_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Join Advisor Api V1 Steps  Step Id  Join Advisor Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/output":{"get":{"tags":["step-output"],"summary":"Get Step Output","description":"Return schema + 20-row sample (or scalar JSON) for a step's latest output.","operationId":"get_step_output_api_v1_steps__step_id__output_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}},{"name":"table","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Output table name for multi-output steps","title":"Table"},"description":"Output table name for multi-output steps"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepOutputResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/output/query":{"post":{"tags":["step-output"],"summary":"Query Step Output","description":"Run a DuckDB SQL query over the step's latest Parquet output (table alias 'data').","operationId":"query_step_output_api_v1_steps__step_id__output_query_post","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10000,"default":1000,"title":"Limit"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepOutputQueryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/steps/{step_id}/code/chat":{"get":{"tags":["step-code-chat"],"summary":"Get Step Code Chat","description":"Return (or create) the durable chat attached to this step's code.","operationId":"get_step_code_chat_api_v1_steps__step_id__code_chat_get","parameters":[{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/step-code-chat/{chat_id}/message":{"post":{"tags":["step-code-chat"],"summary":"Send Step Code Chat Message","description":"Start a turn: the agent reads the step's code and edits or explains it.","operationId":"send_step_code_chat_message_api_v1_step_code_chat__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepCodeChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Step Code Chat Message Api V1 Step Code Chat  Chat Id  Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/runs":{"get":{"tags":["run-history"],"summary":"List Project Runs","description":"Paginated run timeline for the project. Newest first.","operationId":"list_project_runs_api_v1_projects__project_id__runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"default":50,"title":"Limit"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Return runs started before this timestamp","title":"Before"},"description":"Return runs started before this timestamp"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}":{"get":{"tags":["run-history"],"summary":"Get Run","description":"Run detail with StepRun rollup.","operationId":"get_run_api_v1_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__pipelines__schemas__RunRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/cascade_events":{"get":{"tags":["run-history"],"summary":"List Cascade Events","description":"Cascade-decision log for the project's run timeline.","operationId":"list_cascade_events_api_v1_projects__project_id__cascade_events_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CascadeEventListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/runs/{run_id}/steps/{step_id}/rows":{"get":{"tags":["run-history"],"summary":"Get Step Run Rows","description":"Head-sample of rows in this StepRun's step output.\n\nEvery step always runs full (incremental-rethink Task 10) — there is\nno per-run watermark window to slice by any more. This endpoint used\nto slice a ``(prior_watermark, this_watermark]`` window for\nincremental StepRuns; that branch was already dead in practice\n(nothing has written ``StepRun.output_watermark``/``execution_mode_used``\nsince Task 9) and the columns themselves are dropped in Task 13.\nAlways returns a head-sample of the step's cumulative output parquet\nplus its total row count.","operationId":"get_step_run_rows_api_v1_runs__run_id__steps__step_id__rows_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Step Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRunRowsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/chats/{chat_id}/join-advisor-message":{"post":{"tags":["join-advisor"],"summary":"Send Join Advisor Message","description":"Send a follow-up message to an existing Join Advisor chat.","operationId":"send_join_advisor_message_api_v1_chats__chat_id__join_advisor_message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_JoinAdvisorFollowupRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Send Join Advisor Message Api V1 Chats  Chat Id  Join Advisor Message Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-steps/{project_id}/steps":{"get":{"tags":["project-steps"],"summary":"List Project Steps","description":"List all non-suppressed steps in a project.","operationId":"list_project_steps_api_v1_project_steps__project_id__steps_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StepRead"},"title":"Response List Project Steps Api V1 Project Steps  Project Id  Steps Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-steps/{project_id}/lineage":{"get":{"tags":["project-steps"],"summary":"Get Project Lineage","description":"Return the full project DAG for lineage visualization.","operationId":"get_project_lineage_api_v1_project_steps__project_id__lineage_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Project Lineage Api V1 Project Steps  Project Id  Lineage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-steps/{project_id}/run-all":{"post":{"tags":["project-steps"],"summary":"Run All Steps","description":"Run all root steps in a project + cascade to downstream.\n\n``force_full=true`` (query param) bypasses the AI Lambda's content-\naddressed cache / the custom Lambda's api_action ledger for this run\nonly — used for manual \"rebuild from scratch\" replays after schema\nchanges or bug fixes. Cascade-created runs do NOT inherit\n``force_full`` (spec §7d).","operationId":"run_all_steps_api_v1_project_steps__project_id__run_all_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"force_full","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force Full"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/domains__pipelines__schemas__RunRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-steps/{project_id}/runs":{"get":{"tags":["project-steps"],"summary":"List Project Runs","description":"List recent runs for a project, newest first, with step runs.","operationId":"list_project_runs_api_v1_project_steps__project_id__runs_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project 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/domains__pipelines__schemas__RunRead"},"title":"Response List Project Runs Api V1 Project Steps  Project Id  Runs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-steps/{project_id}/pause-all":{"post":{"tags":["project-steps"],"summary":"Pause All Steps","description":"Deactivate all triggers in a project.","operationId":"pause_all_steps_api_v1_project_steps__project_id__pause_all_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Pause All Steps Api V1 Project Steps  Project Id  Pause All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/changes":{"get":{"tags":["steps"],"summary":"List Changes","operationId":"list_changes_api_v1_projects__project_id__changes_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"actor_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Type"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"include_orphans","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Orphans"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/changes/goto":{"post":{"tags":["steps"],"summary":"Goto Change","description":"Move the project's timeline head to ``body.event_id``.\n\nBrowser-style: replays events forward or applies inverses backward\nuntil the live DAG matches the state at the target event. No new\nevents are emitted. Subsequent edits truncate any 'future' events\nrelative to the new head. ``event_id=None`` rewinds to the initial\nstate (pre-log).","operationId":"goto_change_api_v1_projects__project_id__changes_goto_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GotoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":"Response Goto Change Api V1 Projects  Project Id  Changes Goto Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders":{"get":{"tags":["file-folders"],"summary":"List File Folders","description":"List FileFolders. Default = direct children of ``parent_folder_id``.\n\nThe flat-list mode is preserved for clients that haven't been migrated to\nnested navigation yet (the current frontend on ``main`` consumes a flat\nlist); they pass ``flat=true`` and get every folder back.","operationId":"list_file_folders_api_v1_file_folders_get","parameters":[{"name":"parent_folder_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"If provided, return only direct children of this folder. Use the special value 'root' (encoded as missing) to list root folders.","title":"Parent Folder Id"},"description":"If provided, return only direct children of this folder. Use the special value 'root' (encoded as missing) to list root folders."},{"name":"flat","in":"query","required":false,"schema":{"type":"boolean","description":"If true, return every folder in the company (legacy flat view). When false (default) the response is scoped to direct children of ``parent_folder_id`` (or the root level if omitted).","default":false,"title":"Flat"},"description":"If true, return every folder in the company (legacy flat view). When false (default) the response is scoped to direct children of ``parent_folder_id`` (or the root level if omitted)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileFolderRead"},"title":"Response List File Folders Api V1 File Folders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["file-folders"],"summary":"Create File Folder Endpoint","description":"Create a new FileFolder, optionally nested under ``parent_folder_id``.\n\nAny company member may create a root folder (the creator is auto-granted\nADMIN on it inside the operation). Creating a subfolder mutates the\nparent's subtree, so it requires EDITOR on the parent.","operationId":"create_file_folder_endpoint_api_v1_file_folders_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}":{"get":{"tags":["file-folders"],"summary":"Get File Folder","description":"Get a single folder's metadata (used by the explorer header / breadcrumbs).","operationId":"get_file_folder_api_v1_file_folders__folder_id__get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["file-folders"],"summary":"Delete File Folder Endpoint","description":"Cascade-delete a folder. Non-empty/merge folders require type-to-confirm.","operationId":"delete_file_folder_endpoint_api_v1_file_folders__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderDelete"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["file-folders"],"summary":"Update File Folder","description":"Rename and/or toggle merge and/or update write-semantics (incl. the\nfull_delivery batch fields) on a FileFolder.\n\nOrdering: deterministic pre-checks FIRST, then write-semantics, then\nrename, then merge_enabled. Each of the three blocks commits its own\ntransaction internally (full cross-block atomicity is out of scope — see\nthe \"Atomicity contract\" comment below), so every failure mode that's\ndeterministic from the request body + the folder's state at the start of\nthe request (not a race) is checked upfront, before any block runs: a\nrequest like ``{merge_enabled: true, write_semantics: \"replace_overlap\",\ncoverage_columns: [\"bad_col\"]}`` on a folder with existing subfolders\nfails on the pre-check with no side effect at all, instead of committing\nthe semantics change and then 409-ing on ``merge_enabled``. Similarly a\nrename that collides with a sibling name is caught before the semantics\nblock runs, not after.\nNote the collection-schema subset check inside the semantics block still\nuses the CURRENT ``merge_database_id``, which is ``None`` when\n``merge_enabled`` is being turned on in this same request (the check is\nthen skipped since there's no collection schema yet); a bad coverage\ncolumn in that combination surfaces later as a per-file ``merge_error``\non the next merge rather than a 400 here.","operationId":"update_file_folder_api_v1_file_folders__folder_id__patch","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/breadcrumbs":{"get":{"tags":["file-folders"],"summary":"Get Folder Breadcrumbs","description":"Return the breadcrumb path from root → folder (inclusive).\n\nOrder: root first, target last — matches the visual order in the UI so the\nfrontend can render the chain unmodified.","operationId":"get_folder_breadcrumbs_api_v1_file_folders__folder_id__breadcrumbs_get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileFolderBreadcrumb"},"title":"Response Get Folder Breadcrumbs Api V1 File Folders  Folder Id  Breadcrumbs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/members":{"get":{"tags":["file-folders"],"summary":"List Folder Members","description":"List the contributing files (with per-file ``merge_error``) of a folder's\ncollection dataset. Empty list if the folder isn't merge-enabled.","operationId":"list_folder_members_api_v1_file_folders__folder_id__members_get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DatasetMemberRead"},"title":"Response List Folder Members Api V1 File Folders  Folder Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/batches":{"get":{"tags":["file-folders"],"summary":"List Folder Batches","description":"List batch groups (by ``batch_key``) for a folder's ``full_delivery``\nconfig, with each group's read-time computed lifecycle status. Empty list\nif the folder isn't merge-enabled or has no batch members.","operationId":"list_folder_batches_api_v1_file_folders__folder_id__batches_get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BatchSummary"},"title":"Response List Folder Batches Api V1 File Folders  Folder Id  Batches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/batches/{batch_key}:force-merge":{"post":{"tags":["file-folders"],"summary":"Force Merge Batch","description":"Escape hatch for a stuck batch (e.g. timed out at 9/10 files): seal\nwhatever live members currently exist for ``batch_key``, ignoring the\nfolder's configured ``batch_size``.\n\nReuses the exact shared seal path (``application.operations.seal_batch.seal_batch``)\nand advisory lock as the automatic Nth-file seal, so force-merging is\nindistinguishable from a \"natural\" seal to every downstream reader.","operationId":"force_merge_batch_api_v1_file_folders__folder_id__batches__batch_key__force_merge_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}},{"name":"batch_key","in":"path","required":true,"schema":{"type":"string","title":"Batch Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Force Merge Batch Api V1 File Folders  Folder Id  Batches  Batch Key  Force Merge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/batches/{batch_key}:discard":{"post":{"tags":["file-folders"],"summary":"Discard Batch Endpoint","description":"Delete every member row of ``batch_key`` (collection parquet untouched).\n\nTakes the same transaction-scoped advisory lock as ``:force-merge`` and the\nautomatic seal, keyed on the collection id, BEFORE deleting anything — a\nconcurrent seal that already loaded these members (pre-lock) would\notherwise re-upload them into the collection right after we discard them,\norphaning the write. If the discarded batch is the currently-sealed one,\nthe folder's ``sealed_batch_key`` done-marker is cleared in the same\ntransaction so a later delivery resolving to this key isn't silently\nskipped as \"already sealed\".","operationId":"discard_batch_endpoint_api_v1_file_folders__folder_id__batches__batch_key__discard_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}},{"name":"batch_key","in":"path","required":true,"schema":{"type":"string","title":"Batch Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Discard Batch Endpoint Api V1 File Folders  Folder Id  Batches  Batch Key  Discard Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/delete-preview":{"get":{"tags":["file-folders"],"summary":"Preview Delete Folder","description":"Cascade-delete preview. Drives the type-to-confirm dialog on the UI.","operationId":"preview_delete_folder_api_v1_file_folders__folder_id__delete_preview_get","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderDeletePreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/group-key:test":{"post":{"tags":["file-folders"],"summary":"Test Group Key","description":"Dry-run a candidate ``batch_key_pattern`` regex against the folder's\nalready-committed filenames, without persisting anything. Lets the admin\npreview capture groups while still authoring the ``full_delivery`` config\n(before saving it via the folder PATCH ``batch_key_pattern`` field).\nRead-only — VIEWER, like the other GET inspection routes on this resource.","operationId":"test_group_key_api_v1_file_folders__folder_id__group_key_test_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupKeyTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Test Group Key Api V1 File Folders  Folder Id  Group Key Test Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/file-folders/{folder_id}/move":{"post":{"tags":["file-folders"],"summary":"Move File Folder Endpoint","description":"Re-parent a folder. ``target_parent_id=None`` moves to the root.\n\nAuto-renames on sibling collision (``foo → foo (1)``); raises 409 on\ncycle / depth-cap / merge-leaf invariant violations.","operationId":"move_file_folder_endpoint_api_v1_file_folders__folder_id__move_post","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Folder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileFolderRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/magic-links":{"get":{"tags":["files"],"summary":"List Magic Links","description":"List all magic links for the company (any member).","operationId":"list_magic_links_api_v1_files_magic_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MagicLinkRead"},"type":"array","title":"Response List Magic Links Api V1 Files Magic Links Get"}}}}}},"post":{"tags":["files"],"summary":"Create Magic Link","description":"Create a new magic upload link. Any company member may create one.","operationId":"create_magic_link_api_v1_files_magic_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/magic-links/{link_id}":{"patch":{"tags":["files"],"summary":"Update Magic Link","description":"Update label and/or expiry of a magic link (creator or company owner).","operationId":"update_magic_link_api_v1_files_magic_links__link_id__patch","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Delete Magic Link","description":"Revoke (soft-delete) a magic link (creator or company owner).","operationId":"delete_magic_link_api_v1_files_magic_links__link_id__delete","parameters":[{"name":"link_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Link Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload/{token}/meta":{"get":{"tags":["files"],"summary":"Get Magic Link Meta","description":"Return public metadata about a magic link (label, folder prefix, expiry).","operationId":"get_magic_link_meta_api_v1_files_upload__token__meta_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkMeta"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload/{token}":{"post":{"tags":["files"],"summary":"Magic Upload","description":"Upload a file using a magic link token. No account required.\n\nThe token must be valid, active, and not expired.","operationId":"magic_upload_api_v1_files_upload__token__post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_magic_upload_api_v1_files_upload__token__post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload/{token}/initiate":{"post":{"tags":["files"],"summary":"Magic Upload Initiate","description":"Step 1 of the large-file magic-link upload: hand back a presigned target\nthe browser uploads the file to **directly** (browser → S3), bypassing the\nAPI task's memory. The link is validated but NOT consumed here.","operationId":"magic_upload_initiate_api_v1_files_upload__token__initiate_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicUploadInitiateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicUploadInitiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload/{token}/finalize":{"post":{"tags":["files"],"summary":"Magic Upload Finalize","description":"Step 2: the browser has uploaded to S3; verify the object, consume the\nlink, create the ``UserFile``, and dispatch the parse (worker does metadata\n+ Database creation off the request path). No file bytes touch this task.","operationId":"magic_upload_finalize_api_v1_files_upload__token__finalize_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicUploadFinalizeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/upload":{"post":{"tags":["files"],"summary":"Upload File","description":"Upload a CSV, JSON, or Excel file.\n\nAccepts either a Supabase JWT or an API key (``ntr_…``) in the\n``Authorization: Bearer`` header.\n\nThe optional ``folder`` form field places the file in that folder\n(found-or-created on the fly). It takes precedence over any path prefix\nembedded in the filename. Without it, the folder is still derived from a\n``/``-separated filename prefix; no folder means the file lands at root.\n\nUsage (API key)::\n\n    curl -X POST https://api.example.com/api/v1/files/upload \\\n        -H \"Authorization: Bearer ntr_...\" \\\n        -F \"file=@data.csv\" \\\n        -F \"folder=invoices/2024\"","operationId":"upload_file_api_v1_files_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_api_v1_files_upload_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{user_file_id}/commit":{"post":{"tags":["files"],"summary":"Commit User File","description":"Finalize a pending upload with chosen sheets + skip-rows.","operationId":"commit_user_file_api_v1_files__user_file_id__commit_post","parameters":[{"name":"user_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{user_file_id}/parse-config":{"get":{"tags":["files"],"summary":"Get Parse Config","description":"Return analyzer output + current Database state for the cog modal.","operationId":"get_parse_config_api_v1_files__user_file_id__parse_config_get","parameters":[{"name":"user_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["files"],"summary":"Patch Parse Config","description":"Diff the request against current Databases and apply add/update/remove.\n\n* Sheet in request, no current Database → create + dispatch parse.\n* Sheet in request, Database exists, ``header_row_index`` differs →\n  update + dispatch parse.\n* Sheet in request, Database exists, unchanged → no-op.\n* Sheet not in request, Database exists → soft-suppress.","operationId":"patch_parse_config_api_v1_files__user_file_id__parse_config_patch","parameters":[{"name":"user_file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/":{"get":{"tags":["files"],"summary":"List User Files","description":"List uploaded files in the company the caller can see.\n\nOwners see everything; members see files they hold a (direct or\nfolder-inherited) VIEWER grant on.\n\n``include_pending=true`` also returns uploads stuck in\n``parse_state='pending'`` (never finalized through the wizard) so the\nfiles-management UI can show them with a \"to finalize\" badge. Defaults to\ncommitted-only so dataset pickers reusing this endpoint are unaffected.\nThe accessibility filter applies to pending rows the same way.","operationId":"list_user_files_api_v1_files__get","parameters":[{"name":"include_pending","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Pending"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserFileRead"},"title":"Response List User Files Api V1 Files  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/search":{"get":{"tags":["files"],"summary":"Search Files","description":"Search files and folders by name across the whole company.\n\nCase-insensitive substring match on ``name``. Results are gated by the same\nper-resource VIEWER ACL the list endpoints use (owners see everything).\nEmpty ``q`` returns empty results without touching the database — the guard\nruns before the permission-graph lookups so an empty query is truly free.","operationId":"search_files_api_v1_files_search_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}":{"get":{"tags":["files"],"summary":"Get User File","description":"Get metadata for a single file.","operationId":"get_user_file_api_v1_files__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["files"],"summary":"Delete User File","description":"Delete a file (record + S3 object) and cascade to file-backed databases.","operationId":"delete_user_file_api_v1_files__file_id__delete","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["files"],"summary":"Rename User File","description":"Rename a file and cascade to non-user-overridden file-backed databases.","operationId":"rename_user_file_api_v1_files__file_id__patch","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileRename"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}/download":{"get":{"tags":["files"],"summary":"Download User File","description":"Download the raw file content.","operationId":"download_user_file_api_v1_files__file_id__download_get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/files/{file_id}/move":{"post":{"tags":["files"],"summary":"Move User File Endpoint","description":"Move a file into a folder (or to the root if ``target_folder_id`` is None).\n\nSide effects when source/target folders are merge-enabled:\n- source-side: drop the file's slice from the source collection (parquet\n  rewrite + DatasetMember delete) so dashboards reflect the move\n  immediately.\n- target-side: re-arm the file's databases and dispatch a Temporal parse\n  so the rows land in the target collection.\n\nFilename collisions in the destination are auto-resolved with\n``foo (1).csv`` style suffixes.","operationId":"move_user_file_endpoint_api_v1_files__file_id__move_post","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"File Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileMove"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/provision-new-user":{"post":{"tags":["internal"],"summary":"Provision New User","description":"Bootstrap tenancy for a freshly-created ``auth.user``.\n\nThe body is the same bytes the front signed — we re-parse them with\nPydantic here rather than declaring ``body: ProvisionNewUserRequest``\non the signature because FastAPI would otherwise read the request\nstream before the HMAC dep gets a chance, leaving the dep with an\nempty body to hash.","operationId":"provision_new_user_api_v1_internal_provision_new_user_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionNewUserResponse"}}}}}}},"/api/v1/workflow-architect/automations/{automation_id}/chat":{"get":{"tags":["workflow-architect"],"summary":"Get Or Create Chat","operationId":"get_or_create_chat_api_v1_workflow_architect_automations__automation_id__chat_get","parameters":[{"name":"automation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Automation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowChatRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow-architect/chats/{chat_id}/message":{"post":{"tags":["workflow-architect"],"summary":"Send Message","operationId":"send_message_api_v1_workflow_architect_chats__chat_id__message_post","parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Chat Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowMessageRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccessSource":{"properties":{"via_resource_type":{"type":"string","title":"Via Resource Type"},"via_resource_id":{"type":"string","format":"uuid","title":"Via Resource Id"},"via_resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via Resource Name"},"grantee_type":{"$ref":"#/components/schemas/GranteeType"},"grantee_id":{"type":"string","format":"uuid","title":"Grantee Id"},"level":{"$ref":"#/components/schemas/PermissionLevel"},"dataflow_capped":{"type":"boolean","title":"Dataflow Capped"}},"type":"object","required":["via_resource_type","via_resource_id","via_resource_name","grantee_type","grantee_id","level","dataflow_capped"],"title":"AccessSource","description":"One contributing grant path for a user's effective access on a resource."},"ActionCreate":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description","default":""},"parameters":{"items":{"$ref":"#/components/schemas/ParameterIn"},"type":"array","title":"Parameters","default":[]},"grants":{"items":{"$ref":"#/components/schemas/GrantIn"},"type":"array","title":"Grants","default":[]},"effects":{"items":{"$ref":"#/components/schemas/EffectIn"},"type":"array","title":"Effects","default":[]}},"type":"object","required":["name","display_name"],"title":"ActionCreate"},"ActionInvokeRequest":{"properties":{"row_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Key"},"params":{"additionalProperties":true,"type":"object","title":"Params"}},"type":"object","title":"ActionInvokeRequest"},"ActionKind":{"type":"string","enum":["create","modify","delete"],"title":"ActionKind","description":"Which ontology row operation an Action drives."},"ActionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"status":{"$ref":"#/components/schemas/ActionStatus"},"is_default_edit":{"type":"boolean","title":"Is Default Edit"},"parameters":{"items":{"$ref":"#/components/schemas/ParameterRead"},"type":"array","title":"Parameters"},"effects":{"items":{"$ref":"#/components/schemas/EffectRead"},"type":"array","title":"Effects"},"grants":{"items":{"$ref":"#/components/schemas/GrantRead"},"type":"array","title":"Grants"}},"type":"object","required":["id","name","display_name","description","status","is_default_edit","parameters","effects","grants"],"title":"ActionRead"},"ActionStatus":{"type":"string","enum":["draft","active","archived"],"title":"ActionStatus"},"ActionSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"kind":{"$ref":"#/components/schemas/ActionKind"},"status":{"$ref":"#/components/schemas/ActionStatus"},"is_default_edit":{"type":"boolean","title":"Is Default Edit"},"effects":{"items":{"$ref":"#/components/schemas/EffectSummary"},"type":"array","title":"Effects"}},"type":"object","required":["id","name","display_name","description","kind","status","is_default_edit","effects"],"title":"ActionSummary"},"ActionUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"$ref":"#/components/schemas/ActionStatus"},{"type":"null"}]},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ParameterIn"},"type":"array"},{"type":"null"}],"title":"Parameters"},"effects":{"anyOf":[{"items":{"$ref":"#/components/schemas/EffectIn"},"type":"array"},{"type":"null"}],"title":"Effects"},"grants":{"anyOf":[{"items":{"$ref":"#/components/schemas/GrantIn"},"type":"array"},{"type":"null"}],"title":"Grants"}},"type":"object","title":"ActionUpdate"},"ActiveTrigger":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"step_title":{"type":"string","title":"Step Title"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"trigger_type":{"type":"string","title":"Trigger Type"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"next_trigger_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Trigger At"}},"type":"object","required":["step_id","step_title","project_id","project_name","trigger_type","trigger_config","last_triggered_at","next_trigger_at"],"title":"ActiveTrigger"},"ActivityEvent":{"properties":{"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"event_type":{"type":"string","title":"Event Type"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"}},"type":"object","required":["timestamp","event_type","title","description"],"title":"ActivityEvent"},"AddStepRequest":{"properties":{"step_type":{"type":"string","title":"Step Type","description":"source | data_read | process | data_sink | database | dashboard"},"operator":{"type":"string","title":"Operator","description":"Operator registry name (e.g. 'filter', 'api_source')"},"slug":{"type":"string","maxLength":80,"minLength":1,"title":"Slug"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"parent_slugs":{"items":{"type":"string"},"type":"array","title":"Parent Slugs"},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"}},"type":"object","required":["step_type","operator","slug"],"title":"AddStepRequest"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","is_active","last_used_at","created_at","key"],"title":"ApiKeyCreated","description":"Returned only on creation — includes the full key (shown once)."},"ApiKeyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","is_active","last_used_at","created_at"],"title":"ApiKeyRead","description":"Returned when listing keys — never exposes the full key."},"AppAutomationBindingRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"automation_id":{"type":"string","format":"uuid","title":"Automation Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","app_id","automation_id","created_by","created_at"],"title":"AppAutomationBindingRead"},"AppAutomationRunRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input"}},"type":"object","title":"AppAutomationRunRequest"},"AppBranchDiff":{"properties":{"against":{"type":"string","const":"main","title":"Against"},"branch_id":{"type":"string","format":"uuid","title":"Branch Id"},"branch_head_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Head Version Id"},"main_head_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Main Head Version Id"},"is_behind":{"type":"boolean","title":"Is Behind"},"changed_files":{"items":{"type":"string"},"type":"array","title":"Changed Files"},"diff":{"type":"string","title":"Diff"}},"type":"object","required":["against","branch_id","branch_head_version_id","main_head_version_id","is_behind","changed_files","diff"],"title":"AppBranchDiff","description":"What landing this branch would change on main — the review artifact.\n\n`diff` is a unified diff of MAIN's head against the branch head (not\nagainst the fork point): it answers \"what will main look like afterwards\",\nwhich is what a reviewer is approving. It is computed by the same\n`diff_file_sets` the rebase payload uses, so the review modal and the\nserver never drift apart."},"AppBranchRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"name":{"type":"string","title":"Name"},"kind":{"type":"string","title":"Kind"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"chat_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Chat Id"},"head_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Head Version Id"},"base_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Base Version Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"landed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Landed At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"is_behind":{"type":"boolean","title":"Is Behind","default":false}},"type":"object","required":["id","app_id","name","kind","status","chat_id","head_version_id","base_version_id","created_by","landed_at","closed_at"],"title":"AppBranchRead"},"AppChatRequest":{"properties":{"content":{"type":"string","title":"Content"},"attachments":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Attachments","default":[]}},"type":"object","required":["content"],"title":"AppChatRequest"},"AppCreate":{"properties":{"name":{"type":"string","title":"Name","default":"New App"},"description":{"type":"string","title":"Description","default":""}},"type":"object","title":"AppCreate"},"AppEmbedList":{"properties":{"embeds":{"items":{"$ref":"#/components/schemas/AppEmbedRead"},"type":"array","title":"Embeds"}},"type":"object","required":["embeds"],"title":"AppEmbedList"},"AppEmbedRead":{"properties":{"binding_id":{"type":"string","format":"uuid","title":"Binding Id"},"label":{"type":"string","title":"Label"},"child_app_id":{"type":"string","format":"uuid","title":"Child App Id"},"child_name":{"type":"string","title":"Child Name"},"declared_inputs":{"items":{"$ref":"#/components/schemas/EmbedInputDeclaration"},"type":"array","title":"Declared Inputs"},"bundle_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Css"},"ready":{"type":"boolean","title":"Ready"},"unavailable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unavailable Reason"}},"type":"object","required":["binding_id","label","child_app_id","child_name","ready"],"title":"AppEmbedRead","description":"One `<EmbeddedApp widget=\"LABEL\"/>` target resolved for the caller.\n\nBundle BYTES are never included — the component fetches those\nseparately from `/apps/{child}/bundle.js?embed_host_app_id={host}`."},"AppFileTargetSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"label":{"type":"string","title":"Label"},"file_folder_id":{"type":"string","format":"uuid","title":"File Folder Id"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name"},"merge_enabled":{"type":"boolean","title":"Merge Enabled","default":false}},"type":"object","required":["id","label","file_folder_id"],"title":"AppFileTargetSummary"},"AppList":{"properties":{"apps":{"items":{"$ref":"#/components/schemas/AppRead"},"type":"array","title":"Apps"}},"type":"object","required":["apps"],"title":"AppList"},"AppQueryBatchItem":{"properties":{"id":{"type":"string","maxLength":200,"minLength":1,"title":"Id"},"sql":{"type":"string","maxLength":50000,"minLength":1,"title":"Sql"},"limit":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"}},"additionalProperties":false,"type":"object","required":["id","sql"],"title":"AppQueryBatchItem","description":"One query in a batch.\n\n``id`` is a caller-supplied correlation key (e.g. the widget id) echoed\nback on the matching result so the client maps results without relying on\norder. Same ``sql`` / ``limit`` contract as the single-query endpoint."},"AppQueryBatchItemResult":{"properties":{"lane":{"type":"string","enum":["oltp","olap"],"title":"Lane","default":"oltp"},"mirror_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mirror Refreshed At"},"id":{"type":"string","title":"Id"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","columns","rows","total_rows","truncated"],"title":"AppQueryBatchItemResult","description":"Result for one batch query. Exactly one of (data, ``error``) is\nmeaningful: on failure ``columns``/``rows`` are empty and ``error`` holds\nthe message.\n\n``lane``/``mirror_refreshed_at`` are PER ITEM, not per batch: one app page\ncan mix a live editable grid with read-only aggregates, and those are\nserved by different stores in the same request."},"AppQueryBatchRequest":{"properties":{"queries":{"items":{"$ref":"#/components/schemas/AppQueryBatchItem"},"type":"array","maxItems":50,"minItems":1,"title":"Queries"},"embed_host_app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id","description":"Set when this app is running as an embedded widget inside another app. Authorization then requires VIEWER on that host plus an active embed binding — see domains/apps/application/embed_access.py."}},"additionalProperties":false,"type":"object","required":["queries"],"title":"AppQueryBatchRequest","description":"Body for POST /api/v1/apps/{app_id}/query/batch.\n\nCoordinates every query in one bounded execution lifecycle instead of N\nindependent requests. Each query is routed to a read lane independently\n(see ``domains.apps.adapters.routed_query_engine``), so one batch can span\nboth: the OLTP sub-batch goes through ``EntityOltpRead.run_sql_batch``\nbounded by ``ENTITY_STORE_QUERY_CONCURRENCY``, the OLAP sub-batch through\n``EntityOlapRead.run_sql_batch``. Per-query errors are isolated — a\nfailing query returns its ``error`` field without aborting the rest — and\nso is each item's ``lane`` / ``mirror_refreshed_at``."},"AppQueryBatchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/AppQueryBatchItemResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"AppQueryBatchResponse"},"AppQueryRequest":{"properties":{"sql":{"type":"string","maxLength":50000,"minLength":1,"title":"Sql"},"limit":{"anyOf":[{"type":"integer","maximum":5000.0,"minimum":1.0},{"type":"null"}],"title":"Limit"},"embed_host_app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id","description":"Set when this app is running as an embedded widget inside another app. Authorization then requires VIEWER on that host plus an active embed binding — see domains/apps/application/embed_access.py."}},"additionalProperties":false,"type":"object","required":["sql"],"title":"AppQueryRequest","description":"Body for POST /api/v1/apps/{app_id}/query.\n\nSingle mode: caller passes optional ``limit`` (default 1000, max 5000).\nPagination is NOT supported at this endpoint — write ``LIMIT N OFFSET M``\ndirectly in your SQL if you need it. Earlier ``page`` / ``page_size``\nparams were removed because the engine never threaded ``page`` into a\nreal OFFSET (silently returned the same first ``page_size`` rows on\nevery page) — see PR #375 review."},"AppQueryResponse":{"properties":{"lane":{"type":"string","enum":["oltp","olap"],"title":"Lane","default":"oltp"},"mirror_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mirror Refreshed At"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["columns","rows","total_rows","truncated"],"title":"AppQueryResponse"},"AppRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"type":"string","title":"Status"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Css"},"bundle_imports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bundle Imports"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"current_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Version Id"},"embed_inputs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Embed Inputs"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"bindings":{"items":{"$ref":"#/components/schemas/BindingRead"},"type":"array","title":"Bindings"},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false}},"type":"object","required":["id","company_id","user_id","name","description","status","bundle_url","bundle_css","bundle_imports","error_message","current_version_id","created_at","updated_at"],"title":"AppRead"},"AppScenarioCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":10000,"title":"Description","default":""}},"additionalProperties":false,"type":"object","required":["name"],"title":"AppScenarioCreate"},"AppScenarioList":{"properties":{"scenarios":{"items":{"$ref":"#/components/schemas/AppScenarioRead"},"type":"array","title":"Scenarios"}},"type":"object","required":["scenarios"],"title":"AppScenarioList"},"AppScenarioRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"type":"string","enum":["draft","approved","archived"],"title":"Status"},"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","app_id","company_id","name","description","status","created_by","created_at","updated_at"],"title":"AppScenarioRead"},"AppScenarioRevisionCreate":{"properties":{"baseline_ref":{"additionalProperties":true,"type":"object","minProperties":1,"title":"Baseline Ref"},"input_payload":{"additionalProperties":true,"type":"object","title":"Input Payload"}},"additionalProperties":false,"type":"object","required":["baseline_ref"],"title":"AppScenarioRevisionCreate"},"AppScenarioRevisionList":{"properties":{"revisions":{"items":{"$ref":"#/components/schemas/AppScenarioRevisionRead"},"type":"array","title":"Revisions"}},"type":"object","required":["revisions"],"title":"AppScenarioRevisionList"},"AppScenarioRevisionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"scenario_id":{"type":"string","format":"uuid","title":"Scenario Id"},"revision_number":{"type":"integer","title":"Revision Number"},"baseline_ref":{"additionalProperties":true,"type":"object","title":"Baseline Ref"},"input_payload":{"additionalProperties":true,"type":"object","title":"Input Payload"},"input_hash":{"type":"string","title":"Input Hash"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","scenario_id","revision_number","baseline_ref","input_payload","input_hash","created_by","created_at"],"title":"AppScenarioRevisionRead"},"AppScenarioUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string","enum":["draft","approved","archived"]},{"type":"null"}],"title":"Status"}},"additionalProperties":false,"type":"object","title":"AppScenarioUpdate"},"AppUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"AppUpdate"},"AppVersionDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files"},"bundle_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Css"},"bundle_imports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bundle Imports"},"generation_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Generation Context"}},"type":"object","required":["id","app_id","version_number","status","label","bundle_url","error_message","created_by","created_at","files","bundle_css","bundle_imports","generation_context"],"title":"AppVersionDetail"},"AppVersionSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"app_id":{"type":"string","format":"uuid","title":"App Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","app_id","version_number","status","label","bundle_url","error_message","created_by","created_at"],"title":"AppVersionSummary"},"AssistantMessageRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"tagged_entities":{"items":{"$ref":"#/components/schemas/TaggedEntity"},"type":"array","maxItems":10,"title":"Tagged Entities"},"referenced_database_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":10,"title":"Referenced Database Ids"},"attachments":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","maxItems":10,"title":"Attachments"}},"type":"object","required":["content"],"title":"AssistantMessageRequest"},"AssistantTurnResponse":{"properties":{"status":{"type":"string","const":"generating","title":"Status","default":"generating"}},"type":"object","title":"AssistantTurnResponse"},"AttachmentRead":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"category":{"type":"string","title":"Category"},"s3_key":{"type":"string","title":"S3 Key"}},"type":"object","required":["id","url","filename","content_type","category","s3_key"],"title":"AttachmentRead"},"AttributeAutomationConfigured":{"properties":{"automation":{"$ref":"#/components/schemas/AttributeAutomationRead"},"stats":{"$ref":"#/components/schemas/AttributeSyncStats"}},"type":"object","required":["automation","stats"],"title":"AttributeAutomationConfigured"},"AttributeAutomationRead":{"properties":{"definition_id":{"type":"string","format":"uuid","title":"Definition Id"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"match_kind":{"type":"string","title":"Match Kind"},"match_column":{"type":"string","title":"Match Column"},"value_column":{"type":"string","title":"Value Column"},"is_active":{"type":"boolean","title":"Is Active"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"last_sync_matched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Sync Matched"},"last_sync_unmatched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Sync Unmatched"}},"type":"object","required":["definition_id","entity_id","match_kind","match_column","value_column","is_active","last_synced_at","last_sync_matched","last_sync_unmatched"],"title":"AttributeAutomationRead"},"AttributeAutomationWrite":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"match_kind":{"type":"string","enum":["email","user_id"],"title":"Match Kind"},"match_column":{"type":"string","title":"Match Column"},"value_column":{"type":"string","title":"Value Column"}},"type":"object","required":["entity_id","match_kind","match_column","value_column"],"title":"AttributeAutomationWrite"},"AttributeDefinitionCreate":{"properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,64}$","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"AttributeDefinitionCreate"},"AttributeDefinitionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","key","label","created_at"],"title":"AttributeDefinitionRead"},"AttributeDefinitionUpdate":{"properties":{"label":{"type":"string","title":"Label"}},"type":"object","required":["label"],"title":"AttributeDefinitionUpdate"},"AttributeSyncStats":{"properties":{"matched":{"type":"integer","title":"Matched"},"unmatched":{"type":"integer","title":"Unmatched"},"total_rows":{"type":"integer","title":"Total Rows"}},"type":"object","required":["matched","unmatched","total_rows"],"title":"AttributeSyncStats"},"AutomationCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"nodes":{"items":{"$ref":"#/components/schemas/NodeCreate"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeCreate"},"type":"array","title":"Edges"}},"type":"object","required":["name","nodes","edges"],"title":"AutomationCreate"},"AutomationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"$ref":"#/components/schemas/AutomationStatus"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"activated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activated At"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"nodes":{"items":{"$ref":"#/components/schemas/NodeRead"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EdgeRead"},"type":"array","title":"Edges"},"current_user_level":{"anyOf":[{"$ref":"#/components/schemas/PermissionLevel"},{"type":"null"}]},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false}},"type":"object","required":["id","company_id","name","description","status","created_by","created_at","updated_at","activated_at","is_suppressed","nodes","edges"],"title":"AutomationRead"},"AutomationResultDatasetCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"description":{"type":"string","maxLength":2000,"title":"Description","default":""},"table_name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,99}$","title":"Table Name"},"schema_info":{"items":{"$ref":"#/components/schemas/ResultDatasetColumn"},"type":"array","maxItems":500,"minItems":1,"title":"Schema Info"}},"type":"object","required":["name","table_name","schema_info"],"title":"AutomationResultDatasetCreate","description":"Create or recover one append-only dataset owned by an Automation."},"AutomationRunRequest":{"properties":{"input":{"additionalProperties":true,"type":"object","title":"Input"}},"type":"object","title":"AutomationRunRequest","description":"Optional body for ``POST /automations/{id}/run`` (\"Run now\").\n\n``input`` carries the values for a ``trigger.app_invocation`` input schema (the\nsame shape the app-button endpoint accepts). Defaults to empty so schedule- and\nevent-triggered automations can still be fired with no body."},"AutomationStatus":{"type":"string","enum":["draft","active","paused","archived"],"title":"AutomationStatus","description":"Top-level status of an automation."},"AutomationUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"nodes":{"anyOf":[{"items":{"$ref":"#/components/schemas/NodeCreate"},"type":"array"},{"type":"null"}],"title":"Nodes"},"edges":{"anyOf":[{"items":{"$ref":"#/components/schemas/EdgeCreate"},"type":"array"},{"type":"null"}],"title":"Edges"}},"type":"object","title":"AutomationUpdate"},"BatchSummary":{"properties":{"batch_key":{"type":"string","title":"Batch Key"},"count":{"type":"integer","title":"Count"},"size":{"type":"integer","title":"Size"},"status":{"type":"string","title":"Status"},"oldest_created_at":{"type":"string","title":"Oldest Created At"}},"type":"object","required":["batch_key","count","size","status","oldest_created_at"],"title":"BatchSummary","description":"One batch group (by ``batch_key``) in a folder's ingestion pipeline,\nwith its read-time computed lifecycle status."},"BindingRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"mode":{"type":"string","title":"Mode"}},"type":"object","required":["id","entity_id","mode"],"title":"BindingRead"},"Body_magic_upload_api_v1_files_upload__token__post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"uploader_name":{"type":"string","maxLength":200,"title":"Uploader Name","default":""}},"type":"object","required":["file"],"title":"Body_magic_upload_api_v1_files_upload__token__post"},"Body_upload_attachment_api_v1_chats__chat_id__attachments_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_attachment_api_v1_chats__chat_id__attachments_post"},"Body_upload_entity_file_api_v1_apps__app_id__entity_files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"column":{"type":"string","title":"Column"},"row_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Key"},"embed_host_app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}},"type":"object","required":["file","entity_id","column"],"title":"Body_upload_entity_file_api_v1_apps__app_id__entity_files_upload_post"},"Body_upload_file_api_v1_files_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"folder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder"}},"type":"object","required":["file"],"title":"Body_upload_file_api_v1_files_upload_post"},"Body_upload_to_file_target_api_v1_apps__app_id__file_targets__binding_id__upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"embed_host_app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Embed Host App Id"}},"type":"object","required":["file"],"title":"Body_upload_to_file_target_api_v1_apps__app_id__file_targets__binding_id__upload_post"},"CascadeDependency":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"step_title":{"type":"string","title":"Step Title"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"}},"type":"object","required":["step_id","step_title","project_id","project_name"],"title":"CascadeDependency"},"CascadeEdgeMuteCreate":{"properties":{"source_database_id":{"type":"string","format":"uuid","title":"Source Database Id"},"target_database_id":{"type":"string","format":"uuid","title":"Target Database Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["source_database_id","target_database_id","project_id"],"title":"CascadeEdgeMuteCreate"},"CascadeEdgeMuteRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_database_id":{"type":"string","format":"uuid","title":"Source Database Id"},"target_database_id":{"type":"string","format":"uuid","title":"Target Database Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"muted_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Muted By User Id"},"muted_at":{"type":"string","format":"date-time","title":"Muted At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["id","source_database_id","target_database_id","project_id","muted_by_user_id","muted_at"],"title":"CascadeEdgeMuteRead"},"CascadeEventListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/CascadeEventRead"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"CascadeEventListResponse"},"CascadeEventRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"source_database_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Database Id"},"target_database_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Database Id"},"target_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Step Id"},"decision":{"type":"string","title":"Decision"},"detail":{"additionalProperties":true,"type":"object","title":"Detail","default":{}},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"}},"type":"object","required":["id","project_id","source_run_id","source_database_id","target_database_id","target_step_id","decision","occurred_at"],"title":"CascadeEventRead"},"ChangesListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/DAGChangeEventRead"},"type":"array","title":"Events"},"head_event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Head Event Id"}},"type":"object","required":["events"],"title":"ChangesListResponse"},"ChatCreate":{"properties":{"dashboard_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dashboard Id"},"chat_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Type"},"title":{"type":"string","title":"Title","default":"New Chat"}},"type":"object","title":"ChatCreate"},"ChatRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"dashboard_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dashboard Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"chat_type":{"type":"string","title":"Chat Type"},"title":{"type":"string","title":"Title"},"status":{"$ref":"#/components/schemas/ChatStatus"},"generation_token":{"type":"integer","title":"Generation Token","default":0},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","company_id","user_id","dashboard_id","chat_type","title","status","is_suppressed","created_at","updated_at"],"title":"ChatRead"},"ChatStatus":{"type":"string","enum":["idle","generating"],"title":"ChatStatus"},"ChatTitleUpdate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"ChatTitleUpdate"},"ClearBody":{"properties":{"confirm":{"type":"string","title":"Confirm","description":"Must be the literal phrase 'clear all overlays'"}},"type":"object","required":["confirm"],"title":"ClearBody"},"ClearResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"ClearResponse"},"CodeType":{"type":"string","enum":["python","sql"],"title":"CodeType","description":"Runtime language for the step code."},"ColumnSpec":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"ColumnSpec"},"CommentAuthor":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name","description":"Display name; blank if unresolvable.","default":""},"email":{"type":"string","title":"Email","description":"Email; blank if unresolvable.","default":""}},"type":"object","required":["user_id"],"title":"CommentAuthor"},"CommentCounts":{"properties":{"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts","description":"row_key -> live comment count. Row keys with no visible comments are OMITTED, never returned as 0 — an explicit zero would still distinguish 'no comments' from 'you cannot see this row'."}},"type":"object","required":["counts"],"title":"CommentCounts"},"CommentCountsRequest":{"properties":{"row_keys":{"items":{"type":"string"},"type":"array","maxItems":100,"title":"Row Keys"},"app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id"}},"type":"object","required":["row_keys"],"title":"CommentCountsRequest"},"CommentCreate":{"properties":{"row_key":{"type":"string","title":"Row Key","description":"The record's `_row_key`."},"body":{"type":"string","maxLength":10000,"title":"Body"},"app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"App Id","description":"Set when commenting from inside an app — selects the app authorization lane. Omit on the ontology record page."},"parent_comment_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Comment Id","description":"Reply to this comment. Must be a live comment on the SAME record. Replying to a reply is allowed — rendering is flat, so quote resolution never follows more than one hop."}},"type":"object","required":["row_key","body"],"title":"CommentCreate"},"CommentList":{"properties":{"comments":{"items":{"$ref":"#/components/schemas/CommentRead"},"type":"array","title":"Comments"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size","default":50},"total":{"type":"integer","title":"Total","description":"Total live comments on this record."}},"type":"object","required":["comments","page","total"],"title":"CommentList"},"CommentMention":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name","description":"Falls back to the stored marker text.","default":""},"email":{"type":"string","title":"Email","default":""}},"type":"object","required":["user_id"],"title":"CommentMention","description":"A user mentioned in a body, resolved to their CURRENT name.\n\nResolved live rather than read from the stored `@[Display Name](uuid)`\nmarker, so a rename updates every comment that mentions them instead of\nleaving the old name frozen in history."},"CommentQuote":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"author_name":{"type":"string","title":"Author Name","description":"Blank if unresolvable.","default":""},"body_excerpt":{"type":"string","title":"Body Excerpt","description":"Plain text, markers stripped, <= 280 chars. Empty when `is_deleted` — there is nothing left to preview.","default":""},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"The parent was soft-deleted. The reply survives; the client renders 'Original message deleted' in place of the excerpt."}},"type":"object","required":["id","is_deleted"],"title":"CommentQuote","description":"The parent preview above a reply.\n\nResolved SERVER-side, not by the client. The thread pages at\nDEFAULT_PAGE_SIZE, so a reply routinely loads on a page its parent is not\non — a client-side lookup would render a blank quote roughly whenever a\nthread got long."},"CommentRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"body":{"type":"string","title":"Body"},"author":{"$ref":"#/components/schemas/CommentAuthor"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"reply_to":{"anyOf":[{"$ref":"#/components/schemas/CommentQuote"},{"type":"null"}],"description":"The quoted parent, or None for a top-level comment."},"mentions":{"items":{"$ref":"#/components/schemas/CommentMention"},"type":"array","title":"Mentions"},"like_count":{"type":"integer","title":"Like Count","default":0},"liked_by_me":{"type":"boolean","title":"Liked By Me","default":false},"can_edit":{"type":"boolean","title":"Can Edit","description":"Whether THIS caller may edit it. Computed server-side because the app runtime's CurrentUser carries no user id, so the widget cannot decide ownership locally."},"can_delete":{"type":"boolean","title":"Can Delete","description":"Whether THIS caller may delete it."}},"type":"object","required":["id","body","author","created_at","updated_at","can_edit","can_delete"],"title":"CommentRead"},"CommentUpdate":{"properties":{"body":{"type":"string","maxLength":10000,"title":"Body"}},"type":"object","required":["body"],"title":"CommentUpdate"},"CommitRequest":{"properties":{"sheets":{"items":{"$ref":"#/components/schemas/CommitSheet"},"type":"array","title":"Sheets"}},"type":"object","required":["sheets"],"title":"CommitRequest"},"CommitSheet":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"header_row_index":{"type":"integer","minimum":0.0,"title":"Header Row Index","default":0},"database_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Name"}},"type":"object","title":"CommitSheet","description":"One entry in the commit / patch-parse-config request body."},"CompanyCreate":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CompanyCreate"},"CompanyInvitationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"invited_by":{"type":"string","format":"uuid","title":"Invited By"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","company_id","email","role","invited_by","status","created_at"],"title":"CompanyInvitationRead"},"CompanyInvitationValidateRead":{"properties":{"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"role":{"type":"string","title":"Role"}},"type":"object","required":["email","company_name","role"],"title":"CompanyInvitationValidateRead","description":"Public view of a pending invitation, resolved by token.\n\nReturned by the unauthenticated ``/invitations/validate`` endpoint so\nthe accept page can show who the invite is for before the invitee\ncreates their account. Deliberately minimal — no ids, no inviter."},"CompanyInvite":{"properties":{"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role","default":"member"}},"type":"object","required":["email"],"title":"CompanyInvite"},"CompanyListResponse":{"properties":{"companies":{"items":{"$ref":"#/components/schemas/CompanyRead"},"type":"array","title":"Companies"},"default_company_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Default Company Id"}},"type":"object","required":["companies","default_company_id"],"title":"CompanyListResponse"},"CompanyMemberRead":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"has_signed_in":{"type":"boolean","title":"Has Signed In"}},"type":"object","required":["user_id","email","role","joined_at","has_signed_in"],"title":"CompanyMemberRead"},"CompanyMemberRoleUpdate":{"properties":{"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"}},"type":"object","required":["role"],"title":"CompanyMemberRoleUpdate","description":"Request body for changing an existing member's role (owner-only)."},"CompanyMemberSummary":{"properties":{"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"type":"string","title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["company_id","user_id","role","joined_at"],"title":"CompanyMemberSummary","description":"Lightweight member view — no auth.users join.\n\nUsed by :class:`AcceptInvitation` to report the newly-inserted member\nwithout reaching into ``auth.users`` for the email."},"CompanyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","role","created_at"],"title":"CompanyRead"},"CompanyUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"CompanyUpdate"},"ConsumerRef":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"}},"type":"object","required":["type","id","name","project_id","project_name"],"title":"ConsumerRef"},"CrawlerConfigPatchBody":{"properties":{"poll_interval_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poll Interval Seconds"},"backfill_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backfill Window Days"},"selected_tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Selected Tables"},"scope_filters":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Scope Filters"},"crawler_table_configs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Crawler Table Configs"},"purge_removed":{"type":"boolean","title":"Purge Removed","default":false}},"type":"object","title":"CrawlerConfigPatchBody"},"CrawlerConfigPatchResponse":{"properties":{"config":{"$ref":"#/components/schemas/CrawlerConfigRead"},"pending_actions":{"items":{"type":"string"},"type":"array","title":"Pending Actions"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["config","pending_actions","warnings"],"title":"CrawlerConfigPatchResponse"},"CrawlerConfigRead":{"properties":{"poll_interval_seconds":{"type":"integer","title":"Poll Interval Seconds"},"poll_interval_source":{"type":"string","title":"Poll Interval Source"},"backfill_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backfill Window Days"},"backfill_window_days_source":{"type":"string","title":"Backfill Window Days Source"},"selected_tables":{"items":{"type":"string"},"type":"array","title":"Selected Tables"},"scope_filters":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Scope Filters"},"crawler_table_configs":{"anyOf":[{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object"},{"type":"null"}],"title":"Crawler Table Configs"},"config_revision":{"type":"integer","title":"Config Revision"},"crawler_config_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Crawler Config Updated At"}},"type":"object","required":["poll_interval_seconds","poll_interval_source","backfill_window_days","backfill_window_days_source","selected_tables","scope_filters","config_revision","crawler_config_updated_at"],"title":"CrawlerConfigRead"},"CrawlerSchemaRead":{"properties":{"tables":{"items":{"$ref":"#/components/schemas/CrawlerTableSchema"},"type":"array","title":"Tables"},"poll_interval_options_seconds":{"items":{"type":"integer"},"type":"array","title":"Poll Interval Options Seconds"},"min_poll_interval_seconds":{"type":"integer","title":"Min Poll Interval Seconds"},"default_poll_interval_seconds":{"type":"integer","title":"Default Poll Interval Seconds"},"max_backfill_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Backfill Window Days"},"default_backfill_window_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Default Backfill Window Days"}},"type":"object","required":["tables","poll_interval_options_seconds","min_poll_interval_seconds","default_poll_interval_seconds","max_backfill_window_days","default_backfill_window_days"],"title":"CrawlerSchemaRead"},"CrawlerScopeOption":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"}},"type":"object","required":["id","label"],"title":"CrawlerScopeOption"},"CrawlerTableSchema":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"scope_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scope Schema"},"scope_key_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope Key Label"},"supports_purge":{"type":"boolean","title":"Supports Purge","default":false}},"type":"object","required":["name","description"],"title":"CrawlerTableSchema"},"CreateBranchRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"CreateBranchRequest"},"CreateManagedEntityBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"display_name":{"type":"string","title":"Display Name","default":""},"description":{"type":"string","title":"Description","default":""},"key_column":{"type":"string","minLength":1,"title":"Key Column"},"fields":{"items":{"$ref":"#/components/schemas/ManagedFieldBody"},"type":"array","minItems":1,"title":"Fields"}},"type":"object","required":["name","key_column","fields"],"title":"CreateManagedEntityBody","description":"Input for POST /ontology/entities (entity from nothing)."},"DAGChangeEventRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"actor_type":{"type":"string","title":"Actor Type"},"actor_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor Id"},"action":{"type":"string","title":"Action"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","format":"uuid","title":"Target Id"},"target_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Slug"},"summary":{"type":"string","title":"Summary"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"},"revert_target":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Revert Target"}},"type":"object","required":["id","project_id","occurred_at","actor_type","actor_id","action","target_type","target_id","target_slug","summary","params","before","after"],"title":"DAGChangeEventRead"},"DashboardChatRequest":{"properties":{"content":{"type":"string","title":"Content"},"attachments":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Attachments","default":[]},"referenced_database_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Referenced Database Ids","default":[]}},"type":"object","required":["content"],"title":"DashboardChatRequest"},"DashboardCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name","default":"New Dashboard"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["project_id"],"title":"DashboardCreate"},"DashboardQueryRequest":{"properties":{"sql":{"type":"string","maxLength":10000,"title":"Sql"},"limit":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Limit","default":1000},"page":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page"},"page_size":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Page Size"}},"type":"object","required":["sql"],"title":"DashboardQueryRequest"},"DashboardRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Step Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"status":{"type":"string","title":"Status"},"current_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Current Version Id"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Css"},"bundle_imports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bundle Imports"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","company_id","project_id","user_id","name","description","status","bundle_url","bundle_css","bundle_imports","error_message","is_suppressed","created_at","updated_at"],"title":"DashboardRead"},"DashboardStats":{"properties":{"total":{"type":"integer","title":"Total"},"ready":{"type":"integer","title":"Ready"},"draft":{"type":"integer","title":"Draft"},"generating":{"type":"integer","title":"Generating"},"error":{"type":"integer","title":"Error"}},"type":"object","required":["total","ready","draft","generating","error"],"title":"DashboardStats"},"DashboardUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"DashboardUpdate"},"DashboardVersionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"dashboard_id":{"type":"string","format":"uuid","title":"Dashboard Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"files":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Files"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"bundle_css":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Css"},"bundle_imports":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bundle Imports"},"table_refs":{"items":{"type":"string"},"type":"array","title":"Table Refs"},"pipeline_context_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Context Hash"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"generation_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Generation Context"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","dashboard_id","version_number","status","label","bundle_url","bundle_css","bundle_imports","table_refs","pipeline_context_hash","error_message","created_at"],"title":"DashboardVersionRead","description":"Full schema for version detail endpoint (includes files)."},"DashboardVersionSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"dashboard_id":{"type":"string","format":"uuid","title":"Dashboard Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"bundle_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Url"},"pipeline_context_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline Context Hash"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"generation_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Generation Context"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","dashboard_id","version_number","status","label","bundle_url","pipeline_context_hash","error_message","created_at"],"title":"DashboardVersionSummary","description":"Slim schema for version list endpoint (no files)."},"DataQueryResponse":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["columns","rows","total_rows","truncated"],"title":"DataQueryResponse"},"DatabaseCreate":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"schema_info":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Schema Info","default":[]}},"type":"object","required":["project_id","name"],"title":"DatabaseCreate"},"DatabaseRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"table_name":{"type":"string","title":"Table Name"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"schema_info":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Schema Info"},"key_columns":{"items":{"type":"string"},"type":"array","title":"Key Columns","default":[]},"source_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Step Id"},"source_user_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source User File Id"},"source_automation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Automation Id"},"source_sheet_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Sheet Name"},"source_kind":{"type":"string","title":"Source Kind","default":"file"},"is_shared":{"type":"boolean","title":"Is Shared"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"refresh_status":{"type":"string","title":"Refresh Status"},"refresh_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Error"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"name_is_user_overridden":{"type":"boolean","title":"Name Is User Overridden","default":false},"row_count":{"type":"integer","title":"Row Count"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"doc_status":{"type":"string","title":"Doc Status","default":"idle"},"doc_status_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Doc Status Updated At"},"doc_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Last Error"}},"type":"object","required":["id","company_id","user_id","name","description","table_name","storage_path","schema_info","is_shared","is_suppressed","refresh_status","last_refreshed_at","row_count","size_bytes","created_at","updated_at"],"title":"DatabaseRead"},"DatabaseStub":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"refresh_status":{"type":"string","title":"Refresh Status"}},"type":"object","required":["id","name","refresh_status"],"title":"DatabaseStub","description":"Minimal Database summary returned alongside a UserFile on upload.\n\nThe full Database row is filled in asynchronously by the parse workflow.\nFrontend uses ``refresh_status`` to show a spinner until parsing lands."},"DatabaseUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"schema_info":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Schema Info"},"is_shared":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Shared"}},"type":"object","title":"DatabaseUpdate"},"DatabaseWithConsumers":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"table_name":{"type":"string","title":"Table Name"},"consumers":{"items":{"$ref":"#/components/schemas/ConsumerRef"},"type":"array","title":"Consumers"}},"type":"object","required":["id","name","table_name","consumers"],"title":"DatabaseWithConsumers"},"DatabricksColumnSchema":{"properties":{"name":{"type":"string","title":"Name"},"polars_type":{"type":"string","title":"Polars Type"}},"type":"object","required":["name","polars_type"],"title":"DatabricksColumnSchema","description":"One column from Unity Catalog mapped to a Polars-style type.\n\nThe wizard echoes this list back in the ``crawler_table_configs``\nPATCH so the lifecycle layer can populate ``Database.schema_info``\nwithout a fresh round-trip."},"DatabricksDiscoveryItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"}},"type":"object","required":["id","label"],"title":"DatabricksDiscoveryItem","description":"Item returned by Unity Catalog discovery (catalogs / schemas / tables).\n\n``id`` is the namespaced selector the wizard later passes back —\ne.g. ``\"analytics\"`` for a catalog, ``\"analytics.sales\"`` for a\nschema, ``\"analytics.sales.orders\"`` for a table. ``hint`` holds\noptional metadata (table type, comment) for UI tooltips."},"DatabricksWarehouseItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"}},"type":"object","required":["id","label"],"title":"DatabricksWarehouseItem","description":"One SQL warehouse from ``GET /api/2.0/sql/warehouses``.\n\n``id`` is the value the wizard writes to\n``DatabricksTableConfig.warehouse_id``. ``hint`` carries state +\ncluster size so the user can pick the right warehouse without\nleaving the wizard."},"DataflowRead":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeFieldsRead"},"type":"array","title":"Nodes"},"violations":{"items":{"$ref":"#/components/schemas/DataflowViolationRead"},"type":"array","title":"Violations"}},"type":"object","required":["nodes","violations"],"title":"DataflowRead","description":"Design-time data-flow schema for one automation, for the config editor + architect."},"DataflowViolationRead":{"properties":{"node_slug":{"type":"string","title":"Node Slug"},"ref":{"type":"string","title":"Ref"},"severity":{"type":"string","title":"Severity"},"message":{"type":"string","title":"Message"}},"type":"object","required":["node_slug","ref","severity","message"],"title":"DataflowViolationRead"},"DatasetMemberRead":{"properties":{"source_filename":{"type":"string","title":"Source Filename"},"user_file_id":{"type":"string","title":"User File Id"},"row_count":{"type":"integer","title":"Row Count"},"merge_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merge Error"},"merge_warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merge Warning"},"superseded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Superseded At"},"last_refreshed_at":{"type":"string","title":"Last Refreshed At"},"batch_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Key"},"created_at":{"type":"string","title":"Created At","default":""}},"type":"object","required":["source_filename","user_file_id","row_count","last_refreshed_at"],"title":"DatasetMemberRead","description":"One contributing file in a merge-enabled folder's collection dataset."},"EdgeCreate":{"properties":{"from_slug":{"type":"string","title":"From Slug"},"to_slug":{"type":"string","title":"To Slug"},"port":{"type":"string","title":"Port","default":"default"}},"type":"object","required":["from_slug","to_slug"],"title":"EdgeCreate"},"EdgeRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"from_node_id":{"type":"string","format":"uuid","title":"From Node Id"},"to_node_id":{"type":"string","format":"uuid","title":"To Node Id"},"port":{"type":"string","title":"Port"}},"type":"object","required":["id","from_node_id","to_node_id","port"],"title":"EdgeRead"},"EdgeRequest":{"properties":{"parent_slug":{"type":"string","title":"Parent Slug"},"child_slug":{"type":"string","title":"Child Slug"}},"type":"object","required":["parent_slug","child_slug"],"title":"EdgeRequest"},"EffectIn":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"kind":{"$ref":"#/components/schemas/ActionKind"},"is_anchor":{"type":"boolean","title":"Is Anchor","default":false},"relationship_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Relationship Id"},"field_writes":{"items":{"$ref":"#/components/schemas/FieldWriteIn"},"type":"array","title":"Field Writes","default":[]},"guards":{"items":{"$ref":"#/components/schemas/GuardIn"},"type":"array","title":"Guards","default":[]}},"type":"object","required":["entity_id","kind"],"title":"EffectIn","description":"One effect within an ActionCreate payload.\n\nExactly one effect must have ``is_anchor=True``.  The anchor has\n``relationship_id=None``; every secondary effect must supply a\n``relationship_id`` pointing to the ontology relationship that links it to\nanother effect in the same definition."},"EffectRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"kind":{"$ref":"#/components/schemas/ActionKind"},"is_anchor":{"type":"boolean","title":"Is Anchor"},"relationship_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Relationship Id"},"field_writes":{"items":{"$ref":"#/components/schemas/FieldWriteRead"},"type":"array","title":"Field Writes"},"guards":{"items":{"$ref":"#/components/schemas/GuardRead"},"type":"array","title":"Guards"}},"type":"object","required":["id","entity_id","kind","is_anchor","relationship_id","field_writes","guards"],"title":"EffectRead"},"EffectSummary":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"kind":{"$ref":"#/components/schemas/ActionKind"},"is_anchor":{"type":"boolean","title":"Is Anchor"}},"type":"object","required":["entity_id","kind","is_anchor"],"title":"EffectSummary","description":"Per-effect descriptor for the company-scoped Actions panel: enough to\nrender the entity chip + kind badge for every effect without a follow-up\nfetch. The frontend resolves ``entity_id`` to a display name from the\nontology entity list it already loads."},"EffectiveAccessEntry":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"level":{"$ref":"#/components/schemas/PermissionLevel"},"sources":{"items":{"$ref":"#/components/schemas/AccessSource"},"type":"array","title":"Sources"}},"type":"object","required":["user_id","level","sources"],"title":"EffectiveAccessEntry","description":"A user's effective access level on a resource, with all contributing sources."},"EmbedInputDeclaration":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["string","number","boolean"],"title":"Type"},"required":{"type":"boolean","title":"Required","default":false},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name","type"],"title":"EmbedInputDeclaration","description":"One input this app accepts when it is embedded somewhere else.\n\nAdvisory, not an authorization boundary: inputs are a React prop passed\ninside one iframe and never reach the server on their own."},"EntityFileMeta":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"ext":{"type":"string","title":"Ext"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["id","name","ext","size_bytes"],"title":"EntityFileMeta","description":"What the compact File-cell form needs, and nothing more.\n\nDeliberately carries NO preview kind. Deciding \"is this a spreadsheet\"\nrequires parsing it (CSV has no magic header), so a cheap answer here would\ndisagree with `/preview` on exactly the ambiguous files. `ext` drives the\ncell's ICON only — cosmetic, and allowed to be wrong. Every rendering\ndecision comes from `/preview`."},"EntityFilePreview":{"properties":{"kind":{"type":"string","enum":["blob","sheet","unsupported"],"title":"Kind"},"mode":{"anyOf":[{"type":"string","enum":["pdf","image"]},{"type":"null"}],"title":"Mode"},"sheets":{"items":{"type":"string"},"type":"array","title":"Sheets"},"active":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Rows"},"truncated":{"type":"boolean","title":"Truncated","default":false}},"type":"object","required":["kind"],"title":"EntityFilePreview","description":"Discriminated on `kind`:\n\n- \"blob\"        → fetch /download and render natively. `mode` is \"pdf\" or\n                  \"image\". Returned ONLY for magic-verified bytes.\n- \"sheet\"       → render `columns` / `rows` as a table. Already parsed\n                  server-side, so no client parser is needed.\n- \"unsupported\" → offer a download button and render nothing."},"EntityFileUploadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"file_type":{"type":"string","title":"File Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","file_type","size_bytes","created_at"],"title":"EntityFileUploadResponse"},"EntityGraphEdge":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"source_entity_id":{"type":"string","format":"uuid","title":"Source Entity Id"},"target_entity_id":{"type":"string","format":"uuid","title":"Target Entity Id"},"name":{"type":"string","title":"Name"},"relationship_type":{"type":"string","title":"Relationship Type"},"cardinality":{"type":"string","title":"Cardinality"}},"type":"object","required":["id","source_entity_id","target_entity_id","name","relationship_type","cardinality"],"title":"EntityGraphEdge","description":"A directed, typed relationship edge between two entity nodes."},"EntityGraphNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"status":{"type":"string","title":"Status"},"record_count":{"type":"integer","title":"Record Count"},"key_column":{"type":"string","title":"Key Column"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"property_count":{"type":"integer","title":"Property Count"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["id","name","display_name","status","record_count","key_column","database_id","property_count"],"title":"EntityGraphNode","description":"A single entity node in the entity graph."},"EntityGraphRead":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/EntityGraphNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/EntityGraphEdge"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"EntityGraphRead","description":"Company entity graph: entities as nodes, relationships as directed edges."},"EntityNLQueryResponse":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnSpec"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"},"row_key_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Key Column"},"row_key_injected":{"type":"boolean","title":"Row Key Injected","default":false},"title":{"type":"string","title":"Title"},"sql":{"type":"string","title":"Sql"}},"type":"object","required":["columns","rows","total_rows","truncated","title","sql"],"title":"EntityNLQueryResponse","description":"Same, plus the generated SQL so the panel's editor can show it back."},"EntityPropertyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"column_name":{"type":"string","title":"Column Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"data_type":{"type":"string","title":"Data Type"},"is_primary_key":{"type":"boolean","title":"Is Primary Key"},"order":{"type":"integer","title":"Order"},"rules":{"$ref":"#/components/schemas/FieldRules"},"origin":{"type":"string","title":"Origin","default":"source"},"managed_default":{"anyOf":[{},{"type":"null"}],"title":"Managed Default"},"file_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Folder Id"}},"type":"object","required":["id","column_name","display_name","description","data_type","is_primary_key","order"],"title":"EntityPropertyRead","description":"Property in entity listings."},"EntityQueryResponse":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnSpec"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"},"row_key_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Key Column"},"row_key_injected":{"type":"boolean","title":"Row Key Injected","default":false}},"type":"object","required":["columns","rows","total_rows","truncated"],"title":"EntityQueryResponse","description":"Result of a raw-SQL query scoped to one entity's relationship neighbourhood.\n\nColumns are `ColumnSpec` objects where `type` is a display type from\n`domain.rules.duckdb_display_type` (`String` | `Number` | `Boolean` | `Date` |\n`Datetime`), not a raw DuckDB type."},"EntityRelationshipBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"target_entity_id":{"type":"string","format":"uuid","title":"Target Entity Id"},"target_entity_name":{"type":"string","title":"Target Entity Name"},"target_entity_display_name":{"type":"string","title":"Target Entity Display Name"},"relationship_type":{"type":"string","title":"Relationship Type"},"cardinality":{"type":"string","title":"Cardinality"}},"type":"object","required":["id","name","target_entity_id","target_entity_name","target_entity_display_name","relationship_type","cardinality"],"title":"EntityRelationshipBrief","description":"Relationship summary in entity detail."},"EntityRowInsert":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values","description":"Column → value for the new row. Must be a subset of entity columns."}},"type":"object","required":["values"],"title":"EntityRowInsert"},"EntityRowList":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/EntityRowRead"},"type":"array","title":"Rows"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_source":{"type":"integer","title":"Total Source","description":"Source row count (excluding tombstones)."},"total_overlay_only":{"type":"integer","title":"Total Overlay Only","description":"Count of overlay-only inserts."}},"type":"object","required":["rows","page","page_size","total_source","total_overlay_only"],"title":"EntityRowList"},"EntityRowPatch":{"properties":{"patch":{"additionalProperties":true,"type":"object","title":"Patch","description":"Column → new value. Sparse — only changed columns."}},"type":"object","required":["patch"],"title":"EntityRowPatch"},"EntityRowRead":{"properties":{"row_key":{"type":"string","title":"Row Key","description":"Stable identity for this row within the entity."},"values":{"additionalProperties":true,"type":"object","title":"Values","description":"Column → value, post-merge."},"has_overlay":{"type":"boolean","title":"Has Overlay","description":"True if any overlay edits applied to this row.","default":false},"overlay_only":{"type":"boolean","title":"Overlay Only","description":"True if this row exists only in the overlay (no source counterpart).","default":false},"source_deleted":{"type":"boolean","title":"Source Deleted","description":"True if the source row vanished after refresh; row is hidden by default.","default":false},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By","description":"Last editor (None if no overlay)."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"Overlay updated_at if an overlay exists."}},"type":"object","required":["row_key","values"],"title":"EntityRowRead","description":"One merged row (source ⊕ overlay)."},"EntitySyncStatus":{"properties":{"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"source_row_count":{"type":"integer","title":"Source Row Count"},"overlay_count":{"type":"integer","title":"Overlay Count"},"state":{"type":"string","title":"State","description":"'idle' | 'syncing' | 'error'"}},"type":"object","required":["last_synced_at","source_row_count","overlay_count","state"],"title":"EntitySyncStatus"},"EntityUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","title":"EntityUpdate","description":"Input for PATCH /ontology/entities/{id}."},"FedByProject":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"}},"type":"object","required":["project_id","project_name"],"title":"FedByProject","description":"Which project feeds this entity."},"FieldFormat":{"properties":{"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min"},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max"},"regex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Regex"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Length"},"date_min":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Min"},"date_max":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Max"},"allowed_mime":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Mime"},"max_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Size Bytes"}},"type":"object","title":"FieldFormat","description":"Type-specific value constraints. All optional; only set what applies."},"FieldRules":{"properties":{"allowed_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Values"},"required":{"type":"boolean","title":"Required","default":false},"format":{"anyOf":[{"$ref":"#/components/schemas/FieldFormat"},{"type":"null"}]}},"type":"object","title":"FieldRules","description":"Declared value rules for one entity field. Empty instance = no rules."},"FieldSetRead":{"properties":{"certain":{"items":{"type":"string"},"type":"array","title":"Certain"},"possible":{"items":{"type":"string"},"type":"array","title":"Possible"},"open":{"type":"boolean","title":"Open"}},"type":"object","required":["certain","possible","open"],"title":"FieldSetRead","description":"Fields available at one point in the DAG (see domain/dataflow.py::FieldSet)."},"FieldWriteIn":{"properties":{"column_name":{"type":"string","title":"Column Name"},"source_kind":{"$ref":"#/components/schemas/SourceKind"},"const_value":{"anyOf":[{},{"type":"null"}],"title":"Const Value"},"param_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param Name"}},"type":"object","required":["column_name","source_kind"],"title":"FieldWriteIn"},"FieldWriteRead":{"properties":{"column_name":{"type":"string","title":"Column Name"},"source_kind":{"$ref":"#/components/schemas/SourceKind"},"const_value":{"anyOf":[{},{"type":"null"}],"title":"Const Value"},"param_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param Name"}},"type":"object","required":["column_name","source_kind"],"title":"FieldWriteRead"},"FileFolderBreadcrumb":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"FileFolderBreadcrumb","description":"One node on the breadcrumb path returned by the explorer endpoint."},"FileFolderCreate":{"properties":{"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"}},"type":"object","required":["name"],"title":"FileFolderCreate"},"FileFolderDelete":{"properties":{"confirm_with_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confirm With Name"}},"type":"object","title":"FileFolderDelete","description":"DELETE /file-folders/{id} payload — the type-to-confirm guard.\n\nThe frontend renders ``\"Type the folder name to confirm\"`` and only sends\n``confirm_with_name`` once the typed value matches; the backend re-checks\nso the gate can't be bypassed by a hand-rolled client."},"FileFolderDeletePreview":{"properties":{"folder_count":{"type":"integer","title":"Folder Count"},"file_count":{"type":"integer","title":"File Count"},"has_merge":{"type":"boolean","title":"Has Merge"}},"type":"object","required":["folder_count","file_count","has_merge"],"title":"FileFolderDeletePreview","description":"Cascade-delete preview returned by GET /file-folders/{id}/delete-preview."},"FileFolderMove":{"properties":{"target_parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Parent Id"}},"type":"object","title":"FileFolderMove","description":"POST /file-folders/{id}/move payload."},"FileFolderRead":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Folder Id"},"merge_enabled":{"type":"boolean","title":"Merge Enabled"},"schema_mode":{"type":"string","title":"Schema Mode"},"merge_database_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merge Database Id"},"write_semantics":{"type":"string","title":"Write Semantics","default":"append"},"coverage_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Coverage Columns"},"coverage_granularity":{"type":"string","title":"Coverage Granularity","default":"exact"},"batch_key_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Key Pattern"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_timeout_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batch Timeout Hours"},"sealed_batch_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sealed Batch Key"},"member_count":{"type":"integer","title":"Member Count","default":0},"has_children":{"type":"boolean","title":"Has Children","default":false}},"type":"object","required":["id","name","merge_enabled","schema_mode","merge_database_id"],"title":"FileFolderRead"},"FileFolderSearchResult":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Folder Id"},"merge_enabled":{"type":"boolean","title":"Merge Enabled"},"schema_mode":{"type":"string","title":"Schema Mode"},"merge_database_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Merge Database Id"},"parent_path":{"type":"string","title":"Parent Path","default":""}},"type":"object","required":["id","name","merge_enabled","schema_mode"],"title":"FileFolderSearchResult","description":"A folder search hit — folder identity plus the path of its parent chain.\n\nDeliberately does NOT inherit ``FileFolderRead``: ``member_count`` /\n``has_children`` are derived per-folder (extra queries) and search doesn't\nneed them, so returning them here would just fabricate ``0`` / ``false``."},"FileFolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"merge_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Merge Enabled"},"write_semantics":{"anyOf":[{"type":"string","enum":["append","replace_overlap","replace_all","full_delivery"]},{"type":"null"}],"title":"Write Semantics"},"coverage_columns":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Coverage Columns"},"coverage_granularity":{"anyOf":[{"type":"string","enum":["exact","day","month","quarter","year"]},{"type":"null"}],"title":"Coverage Granularity"},"batch_key_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Key Pattern"},"batch_size":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Batch Size"},"batch_timeout_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batch Timeout Hours"}},"type":"object","title":"FileFolderUpdate","description":"PATCH payload — every field is optional so the same endpoint covers\nrename and merge toggle (mutually exclusive at most use sites; a single\nrequest that sets both is honoured in declaration order: rename first,\nthen merge toggle, so a rename of a soon-to-be-merge folder picks up the\nnew collection name without an extra round-trip)."},"FileSearchResponse":{"properties":{"folders":{"items":{"$ref":"#/components/schemas/FileFolderSearchResult"},"type":"array","title":"Folders"},"files":{"items":{"$ref":"#/components/schemas/UserFileSearchResult"},"type":"array","title":"Files"}},"type":"object","title":"FileSearchResponse","description":"Company-wide file/folder name-search results."},"FolderCreate":{"properties":{"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"}},"type":"object","required":["name"],"title":"FolderCreate"},"FolderMove":{"properties":{"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"}},"type":"object","title":"FolderMove"},"FolderRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Folder Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","company_id","user_id","name","parent_folder_id","created_at","updated_at"],"title":"FolderRead"},"FolderUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"FolderUpdate"},"GotoRequest":{"properties":{"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"}},"type":"object","title":"GotoRequest","description":"Body for ``POST /{project_id}/changes/goto`` — browser-style timeline navigation.\n\n``event_id=None`` rewinds to the initial state (before any recorded events)."},"GrantIn":{"properties":{"principal_kind":{"$ref":"#/components/schemas/PrincipalKind"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["principal_kind"],"title":"GrantIn"},"GrantRead":{"properties":{"principal_kind":{"$ref":"#/components/schemas/PrincipalKind"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["principal_kind"],"title":"GrantRead"},"GranteeType":{"type":"string","enum":["user","group"],"title":"GranteeType","description":"Who a resource grant targets — a user or a user group."},"GroupCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""},"rule":{"anyOf":[{"items":{"$ref":"#/components/schemas/GroupRuleCondition"},"type":"array"},{"type":"null"}],"title":"Rule"}},"type":"object","required":["name"],"title":"GroupCreate"},"GroupKeyTestRequest":{"properties":{"pattern":{"type":"string","title":"Pattern"}},"type":"object","required":["pattern"],"title":"GroupKeyTestRequest","description":"POST /file-folders/{id}/group-key:test payload — a candidate\n``batch_key_pattern`` regex to dry-run (not yet saved)."},"GroupMembersRead":{"properties":{"group_id":{"type":"string","format":"uuid","title":"Group Id"},"manual_member_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Manual Member Ids"},"effective_member_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Effective Member Ids"}},"type":"object","required":["group_id","manual_member_ids","effective_member_ids"],"title":"GroupMembersRead"},"GroupRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"rule":{"anyOf":[{"items":{"$ref":"#/components/schemas/GroupRuleCondition"},"type":"array"},{"type":"null"}],"title":"Rule"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","description","rule","created_at"],"title":"GroupRead"},"GroupRuleCondition":{"properties":{"attribute_key":{"type":"string","title":"Attribute Key"},"operator":{"type":"string","enum":["eq","in"],"title":"Operator"},"values":{"items":{"type":"string"},"type":"array","title":"Values"}},"type":"object","required":["attribute_key","operator","values"],"title":"GroupRuleCondition"},"GroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rule":{"anyOf":[{"items":{"$ref":"#/components/schemas/GroupRuleCondition"},"type":"array"},{"type":"null"}],"title":"Rule"},"clear_rule":{"type":"boolean","title":"Clear Rule","default":false}},"type":"object","title":"GroupUpdate"},"GuardIn":{"properties":{"column_name":{"type":"string","title":"Column Name"},"op":{"type":"string","title":"Op"},"value":{"title":"Value"}},"type":"object","required":["column_name","op","value"],"title":"GuardIn"},"GuardRead":{"properties":{"column_name":{"type":"string","title":"Column Name"},"op":{"type":"string","title":"Op"},"value":{"title":"Value"}},"type":"object","required":["column_name","op","value"],"title":"GuardRead"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IncidentBannerRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"message":{"type":"string","title":"Message"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["id","message","severity"],"title":"IncidentBannerRead","description":"What the frontend needs to render the bar. Nothing more."},"IntegrationCreate":{"properties":{"provider_id":{"type":"string","format":"uuid","title":"Provider Id"},"nango_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nango Connection Id"},"credentials":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credentials"}},"type":"object","required":["provider_id"],"title":"IntegrationCreate"},"IntegrationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"provider_id":{"type":"string","format":"uuid","title":"Provider Id"},"nango_connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nango Connection Id"},"status":{"type":"string","title":"Status"},"has_credentials":{"type":"boolean","title":"Has Credentials","default":false},"connected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Connected At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","company_id","user_id","provider_id","nango_connection_id","status","connected_at","created_at"],"title":"IntegrationRead"},"InvitationAccept":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"InvitationAccept"},"InvocationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvocationRead"},"type":"array","title":"Items"},"hit_limit":{"type":"boolean","title":"Hit Limit"}},"type":"object","required":["items","hit_limit"],"title":"InvocationListResponse"},"InvocationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"action_id":{"type":"string","format":"uuid","title":"Action Id"},"action_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Display Name"},"action_kind":{"anyOf":[{"$ref":"#/components/schemas/ActionKind"},{"type":"null"}]},"row_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Row Key"},"source":{"$ref":"#/components/schemas/InvocationSource"},"source_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Id"},"result":{"$ref":"#/components/schemas/InvocationResult"},"error_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Detail"},"invoked_by":{"type":"string","format":"uuid","title":"Invoked By"},"invoked_at":{"type":"string","format":"date-time","title":"Invoked At"},"params":{"additionalProperties":true,"type":"object","title":"Params"}},"type":"object","required":["id","action_id","source","result","invoked_by","invoked_at"],"title":"InvocationRead","description":"One audit-trail row for the per-entity History timeline. Includes the\ninvoking Action's display fields; ``invoked_by`` is a profile UUID that the\nfrontend maps to an email via the company members directory."},"InvocationResult":{"type":"string","enum":["ok","denied_who","denied_inactive","denied_guard","denied_value","denied_field_rules","denied_rls","error"],"title":"InvocationResult"},"InvocationSource":{"type":"string","enum":["app","automation","ontology_page","runner","chat"],"title":"InvocationSource"},"LandBranchRequest":{"properties":{"expected_head_version_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Expected Head Version Id"}},"type":"object","title":"LandBranchRequest","description":"Optional body for land.\n\n`expected_head_version_id` is the branch head the caller reviewed in the\ndiff modal. Sending it turns land into a checked operation: if a concurrent\nbuild advanced the branch in between, the land is refused with\n`branch_head_moved` instead of putting unreviewed changes on main. Omitting\nit (or the whole body) preserves the original behaviour."},"LegoMessageRequest":{"properties":{"content":{"type":"string","maxLength":10000,"minLength":1,"title":"Content"},"referenced_database_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Referenced Database Ids"},"attachments":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Attachments"}},"type":"object","required":["content"],"title":"LegoMessageRequest"},"LegoTurnResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"LegoTurnResponse"},"LineageEdge":{"properties":{"source":{"type":"string","title":"Source"},"target":{"type":"string","title":"Target"},"relation":{"type":"string","title":"Relation"}},"type":"object","required":["source","target","relation"],"title":"LineageEdge","description":"An edge in the lineage DAG."},"LineageExternalNode":{"properties":{"id":{"type":"string","title":"Id"},"app_key":{"type":"string","title":"App Key"},"display_name":{"type":"string","title":"Display Name"},"node_type":{"type":"string","title":"Node Type"},"description":{"type":"string","title":"Description","default":""},"category":{"type":"string","title":"Category","default":""},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"}},"type":"object","required":["id","app_key","display_name","node_type"],"title":"LineageExternalNode","description":"An external system (source or sink)."},"LineageStepNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"step_type":{"type":"string","title":"Step Type"},"code_type":{"type":"string","title":"Code Type","default":"python"},"provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Slug"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"order":{"type":"integer","title":"Order"},"status":{"type":"string","title":"Status","default":"draft"},"is_virtual":{"type":"boolean","title":"Is Virtual","default":false},"parent_step_ids":{"items":{"type":"string"},"type":"array","title":"Parent Step Ids","default":[]},"last_run_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Run Status"},"last_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Run At"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"operator_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Config"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"},"entity_icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Icon"},"resource_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Resource Id"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name"},"database_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Name"},"schema_info":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Schema Info","default":[]},"row_count":{"type":"integer","title":"Row Count","default":0},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"}},"type":"object","required":["id","slug","title","description","step_type","order"],"title":"LineageStepNode","description":"A single step in the project DAG (includes virtual steps)."},"LineageTriggerNode":{"properties":{"id":{"type":"string","title":"Id"},"step_id":{"type":"string","format":"uuid","title":"Step Id"},"trigger_type":{"type":"string","title":"Trigger Type"},"label":{"type":"string","title":"Label"},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron"}},"type":"object","required":["id","step_id","trigger_type","label"],"title":"LineageTriggerNode","description":"A step trigger (schedule or manual)."},"MagicLinkCreate":{"properties":{"label":{"type":"string","title":"Label","default":""},"folder_prefix":{"type":"string","title":"Folder Prefix","default":""},"expires_in_hours":{"type":"integer","title":"Expires In Hours","default":72},"is_permanent":{"type":"boolean","title":"Is Permanent","default":false}},"type":"object","title":"MagicLinkCreate"},"MagicLinkCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"token":{"type":"string","title":"Token"},"label":{"type":"string","title":"Label"},"folder_prefix":{"type":"string","title":"Folder Prefix"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"upload_url":{"type":"string","title":"Upload Url"}},"type":"object","required":["id","company_id","created_by","token","label","folder_prefix","expires_at","is_active","created_at","upload_url"],"title":"MagicLinkCreated","description":"Returned on creation — includes the full upload URL hint."},"MagicLinkMeta":{"properties":{"company_name":{"type":"string","title":"Company Name"},"label":{"type":"string","title":"Label"},"folder_prefix":{"type":"string","title":"Folder Prefix"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["company_name","label","folder_prefix","expires_at","is_active"],"title":"MagicLinkMeta","description":"Public view of a magic link — no token field."},"MagicLinkRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"token":{"type":"string","title":"Token"},"label":{"type":"string","title":"Label"},"folder_prefix":{"type":"string","title":"Folder Prefix"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","company_id","created_by","token","label","folder_prefix","expires_at","is_active","created_at"],"title":"MagicLinkRead"},"MagicLinkUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"expires_in_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Hours"},"is_permanent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Permanent"}},"type":"object","title":"MagicLinkUpdate"},"MagicUploadFinalizeRequest":{"properties":{"user_file_id":{"type":"string","format":"uuid","title":"User File Id"},"filename":{"type":"string","title":"Filename"},"uploader_name":{"type":"string","title":"Uploader Name","default":""}},"type":"object","required":["user_file_id","filename"],"title":"MagicUploadFinalizeRequest","description":"Finalize a completed direct-to-S3 magic-link upload."},"MagicUploadInitiateRequest":{"properties":{"filename":{"type":"string","title":"Filename"}},"type":"object","required":["filename"],"title":"MagicUploadInitiateRequest","description":"Ask for a presigned direct-to-S3 upload target for a magic-link file."},"MagicUploadInitiateResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Fields"},"user_file_id":{"type":"string","format":"uuid","title":"User File Id"},"key":{"type":"string","title":"Key"}},"type":"object","required":["upload_url","fields","user_file_id","key"],"title":"MagicUploadInitiateResponse","description":"Presigned target the browser POSTs the file to (multipart form).\n\n``fields`` are form fields that MUST be sent (in order, file last) with the\nupload; ``user_file_id`` is echoed back to ``/finalize`` so the finished S3\nobject can be matched."},"ManagedFieldBody":{"properties":{"column_name":{"type":"string","minLength":1,"title":"Column Name"},"display_name":{"type":"string","title":"Display Name","default":""},"data_type":{"type":"string","title":"Data Type","default":"String"},"managed_default":{"anyOf":[{},{"type":"null"}],"title":"Managed Default"},"rules":{"$ref":"#/components/schemas/FieldRules"}},"type":"object","required":["column_name"],"title":"ManagedFieldBody","description":"One field definition in a CreateManagedEntityBody request."},"ManagedPropertyCreate":{"properties":{"column_name":{"type":"string","minLength":1,"title":"Column Name"},"display_name":{"type":"string","title":"Display Name","default":""},"data_type":{"type":"string","title":"Data Type","default":"String"},"managed_default":{"anyOf":[{},{"type":"null"}],"title":"Managed Default"},"rules":{"$ref":"#/components/schemas/FieldRules"},"file_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Folder Id"}},"type":"object","required":["column_name"],"title":"ManagedPropertyCreate","description":"Input for POST /ontology/entities/{id}/properties (managed fields only)."},"MeRead":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"attributes":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Attributes"}},"type":"object","required":["name","email","role","attributes"],"title":"MeRead"},"MemberAttributesRead":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"attributes":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Attributes"}},"type":"object","required":["user_id","attributes"],"title":"MemberAttributesRead"},"MemberAttributesWrite":{"properties":{"values":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"propertyNames":{"format":"uuid"},"type":"object","title":"Values"}},"type":"object","required":["values"],"title":"MemberAttributesWrite"},"MessageCreate":{"properties":{"role":{"type":"string","title":"Role","default":"user"},"content":{"type":"string","title":"Content"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"}},"type":"object","required":["content"],"title":"MessageCreate"},"MessageRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"chat_id":{"type":"string","format":"uuid","title":"Chat Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"},"is_compacted":{"type":"boolean","title":"Is Compacted","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email"}},"type":"object","required":["id","chat_id","role","content","extra_metadata","created_at"],"title":"MessageRead"},"MonitoringInsights":{"properties":{"status_banner":{"$ref":"#/components/schemas/StatusBanner"},"priority_actions":{"items":{"$ref":"#/components/schemas/PriorityAction"},"type":"array","title":"Priority Actions"},"smart_insights":{"items":{"$ref":"#/components/schemas/SmartInsight"},"type":"array","title":"Smart Insights"},"activity_timeline":{"items":{"$ref":"#/components/schemas/ActivityEvent"},"type":"array","title":"Activity Timeline"}},"type":"object","required":["status_banner","priority_actions","smart_insights","activity_timeline"],"title":"MonitoringInsights"},"MonitoringOverview":{"properties":{"steps":{"$ref":"#/components/schemas/StepStats"},"dashboards":{"$ref":"#/components/schemas/DashboardStats"},"runs_last_7d":{"$ref":"#/components/schemas/RunStats"},"recent_runs":{"items":{"$ref":"#/components/schemas/RecentRun"},"type":"array","title":"Recent Runs"},"recent_errors":{"items":{"$ref":"#/components/schemas/RecentError"},"type":"array","title":"Recent Errors"},"active_triggers":{"items":{"$ref":"#/components/schemas/ActiveTrigger"},"type":"array","title":"Active Triggers"}},"type":"object","required":["steps","dashboards","runs_last_7d","recent_runs","recent_errors","active_triggers"],"title":"MonitoringOverview"},"NLQueryRequest":{"properties":{"question":{"type":"string","title":"Question"}},"type":"object","required":["question"],"title":"NLQueryRequest"},"NLQueryResponse":{"properties":{"title":{"type":"string","title":"Title"},"sql":{"type":"string","title":"Sql"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"total_rows":{"type":"integer","title":"Total Rows"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["title","sql","columns","rows","total_rows","truncated"],"title":"NLQueryResponse","description":"NL → SQL response. ``sql`` is the generated query so the SQL editor\ncan show it back to the user; rows/columns are the executed result."},"NodeConfigUpdate":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["config"],"title":"NodeConfigUpdate","description":"Direct edit of a node's ``config`` payload — bypasses the architect chat.\n\nThe new dict replaces the existing config wholesale (no shallow merge); validation\nruns through ``validate_automation_dag(require_reachable=False)`` so an incomplete\nbody during editing is fine, but kind-specific config schema, dup-slug, port, and\ncycle checks still apply."},"NodeCreate":{"properties":{"slug":{"type":"string","title":"Slug"},"kind":{"$ref":"#/components/schemas/NodeKind"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"position_x":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position X"},"position_y":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Y"}},"type":"object","required":["slug","kind"],"title":"NodeCreate"},"NodeFieldsRead":{"properties":{"slug":{"type":"string","title":"Slug"},"kind":{"type":"string","title":"Kind"},"input":{"$ref":"#/components/schemas/FieldSetRead"},"output":{"$ref":"#/components/schemas/FieldSetRead"}},"type":"object","required":["slug","kind","input","output"],"title":"NodeFieldsRead"},"NodeKind":{"type":"string","enum":["trigger.schedule","trigger.entity_change","trigger.app_invocation","fetch_entities","query","update_entity_row","create_entity_row","load_scenario_revision","custom_code","dataset_sink","if","aggregate_to_one","ai_step","send_email","http_request","provider_action"],"title":"NodeKind","description":"All v1 node kinds. Triggers + body nodes share one enum + one table."},"NodeRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"kind":{"$ref":"#/components/schemas/NodeKind"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"position_x":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position X"},"position_y":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position Y"}},"type":"object","required":["id","slug","kind","config","position_x","position_y"],"title":"NodeRead"},"NodeRunRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"node_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Node Id"},"node_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Slug"},"node_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Kind"},"status":{"$ref":"#/components/schemas/NodeRunStatus"},"items_in":{"type":"integer","title":"Items In"},"items_out":{"type":"integer","title":"Items Out"},"items_failed":{"type":"integer","title":"Items Failed"},"duration_ms":{"type":"integer","title":"Duration Ms"},"input_sample":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Sample"},"output_sample":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output Sample"},"error_sample":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error Sample"}},"type":"object","required":["id","node_id","node_slug","node_kind","status","items_in","items_out","items_failed","duration_ms","input_sample","output_sample","error_sample"],"title":"NodeRunRead"},"NodeRunStatus":{"type":"string","enum":["success","partial_success","failed","skipped"],"title":"NodeRunStatus","description":"Status of a single node execution within a run."},"OntologyChatMessageRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"OntologyChatMessageRequest","description":"Send a message to the ontology advisor."},"OntologyChatMessageResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"OntologyChatMessageResponse","description":"Response after dispatching an ontology chat message."},"OntologyDatabaseRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"integration_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Integration Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"table_name":{"type":"string","title":"Table Name"},"storage_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Storage Path"},"schema_info":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Schema Info"},"key_columns":{"items":{"type":"string"},"type":"array","title":"Key Columns","default":[]},"source_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Step Id"},"source_user_file_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source User File Id"},"source_automation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Automation Id"},"source_sheet_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Sheet Name"},"source_kind":{"type":"string","title":"Source Kind","default":"file"},"is_shared":{"type":"boolean","title":"Is Shared"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"refresh_status":{"type":"string","title":"Refresh Status"},"refresh_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Error"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"name_is_user_overridden":{"type":"boolean","title":"Name Is User Overridden","default":false},"row_count":{"type":"integer","title":"Row Count"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"doc_status":{"type":"string","title":"Doc Status","default":"idle"},"doc_status_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Doc Status Updated At"},"doc_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Last Error"},"source_project_name":{"type":"string","title":"Source Project Name","default":""},"source_provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Slug"},"source_provider_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Display Name"},"source_provider_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Domain"},"used_by_projects":{"items":{"$ref":"#/components/schemas/UsedByProject"},"type":"array","title":"Used By Projects","default":[]},"cascade_dependencies":{"items":{"$ref":"#/components/schemas/CascadeDependency"},"type":"array","title":"Cascade Dependencies","default":[]}},"type":"object","required":["id","company_id","user_id","name","description","table_name","storage_path","schema_info","is_shared","is_suppressed","refresh_status","last_refreshed_at","row_count","size_bytes","created_at","updated_at"],"title":"OntologyDatabaseRead","description":"Database with extra ontology context: source project name, usage, and cascade deps."},"OntologyGraphEdge":{"properties":{"source_database_id":{"type":"string","format":"uuid","title":"Source Database Id"},"target_database_id":{"type":"string","format":"uuid","title":"Target Database Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"is_muted":{"type":"boolean","title":"Is Muted"},"mute_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Mute Id"},"muted_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Muted By User Id"},"muted_by_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Muted By User Name"},"muted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Muted At"},"mute_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mute Reason"},"via_entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Via Entity Id"},"via_entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via Entity Name"}},"type":"object","required":["source_database_id","target_database_id","project_id","project_name","is_muted","mute_id","muted_by_user_id","muted_by_user_name","muted_at","mute_reason"],"title":"OntologyGraphEdge"},"OntologyGraphNode":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"table_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table Name"},"is_shared":{"type":"boolean","title":"Is Shared"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"source_provider_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Slug"},"source_provider_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Display Name"},"source_provider_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Provider Domain"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Folder Name"},"row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count"},"last_refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refreshed At"},"refresh_status":{"type":"string","title":"Refresh Status"},"refresh_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Error"},"is_outdated":{"type":"boolean","title":"Is Outdated","default":false},"outdated_by_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Outdated By Id"},"trigger_types":{"items":{"type":"string"},"type":"array","title":"Trigger Types"},"database_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Database Step Id"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"entity_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Name"}},"type":"object","required":["id","name","table_name","is_shared","project_id","project_name","source_provider_slug","source_provider_display_name","source_provider_domain","row_count","last_refreshed_at","refresh_status","trigger_types","database_step_id"],"title":"OntologyGraphNode"},"OntologyGraphRead":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/OntologyGraphNode"},"type":"array","title":"Nodes"},"edges":{"items":{"$ref":"#/components/schemas/OntologyGraphEdge"},"type":"array","title":"Edges"}},"type":"object","required":["nodes","edges"],"title":"OntologyGraphRead"},"PaginatedQueryResponse":{"properties":{"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"total_rows":{"type":"integer","title":"Total Rows"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["columns","rows","page","page_size","total_rows","total_pages"],"title":"PaginatedQueryResponse"},"ParameterIn":{"properties":{"name":{"type":"string","title":"Name"},"data_type":{"type":"string","title":"Data Type","default":"String"},"required":{"type":"boolean","title":"Required","default":false},"validation":{"additionalProperties":true,"type":"object","title":"Validation","default":{}},"order":{"type":"integer","title":"Order","default":0}},"type":"object","required":["name"],"title":"ParameterIn"},"ParameterRead":{"properties":{"name":{"type":"string","title":"Name"},"data_type":{"type":"string","title":"Data Type","default":"String"},"required":{"type":"boolean","title":"Required","default":false},"validation":{"additionalProperties":true,"type":"object","title":"Validation","default":{}},"order":{"type":"integer","title":"Order","default":0}},"type":"object","required":["name"],"title":"ParameterRead"},"ParseConfigDatabase":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"header_row_index":{"type":"integer","title":"Header Row Index"},"refresh_status":{"type":"string","title":"Refresh Status"}},"type":"object","required":["id","name","header_row_index","refresh_status"],"title":"ParseConfigDatabase"},"ParseConfigResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"state":{"type":"string","title":"State"},"sheets":{"items":{"$ref":"#/components/schemas/ParseConfigSheet"},"type":"array","title":"Sheets"}},"type":"object","required":["id","state","sheets"],"title":"ParseConfigResponse"},"ParseConfigSheet":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"analyzer_header_row_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Analyzer Header Row Index"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"preview_rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Preview Rows"},"fail_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fail Reason"},"current_database":{"anyOf":[{"$ref":"#/components/schemas/ParseConfigDatabase"},{"type":"null"}]}},"type":"object","title":"ParseConfigSheet","description":"Per-sheet info for the cog modal — analyzer output + current Database."},"PermissionGrant":{"properties":{"grantee_type":{"$ref":"#/components/schemas/GranteeType"},"grantee_id":{"type":"string","format":"uuid","title":"Grantee Id"},"level":{"$ref":"#/components/schemas/PermissionLevel"}},"type":"object","required":["grantee_type","grantee_id","level"],"title":"PermissionGrant"},"PermissionLevel":{"type":"string","enum":["viewer","editor","admin"],"title":"PermissionLevel","description":"Permission tiers, strictly ordered VIEWER < EDITOR < ADMIN."},"PermissionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"resource_type":{"$ref":"#/components/schemas/ResourceType"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"},"grantee_type":{"$ref":"#/components/schemas/GranteeType"},"grantee_id":{"type":"string","format":"uuid","title":"Grantee Id"},"level":{"$ref":"#/components/schemas/PermissionLevel"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","company_id","resource_type","resource_id","grantee_type","grantee_id","level","created_at","updated_at"],"title":"PermissionRead"},"PermissionUpdate":{"properties":{"level":{"$ref":"#/components/schemas/PermissionLevel"}},"type":"object","required":["level"],"title":"PermissionUpdate"},"PrincipalKind":{"type":"string","enum":["role","user"],"title":"PrincipalKind","description":"What an action_grant points at."},"PriorityAction":{"properties":{"id":{"type":"string","title":"Id"},"priority":{"type":"integer","title":"Priority"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"impact":{"type":"string","title":"Impact"},"category":{"type":"string","title":"Category"},"step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Step Id"},"step_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Title"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"}},"type":"object","required":["id","priority","title","description","impact","category","step_id","step_title","project_id","project_name"],"title":"PriorityAction"},"ProjectCreate":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["name"],"title":"ProjectCreate"},"ProjectLineageResponse":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/LineageStepNode"},"type":"array","title":"Steps"},"entities":{"items":{"$ref":"#/components/schemas/domains__projects__schemas__EntityRead"},"type":"array","title":"Entities","default":[]},"externals":{"items":{"$ref":"#/components/schemas/LineageExternalNode"},"type":"array","title":"Externals"},"triggers":{"items":{"$ref":"#/components/schemas/LineageTriggerNode"},"type":"array","title":"Triggers","default":[]},"edges":{"items":{"$ref":"#/components/schemas/LineageEdge"},"type":"array","title":"Edges"}},"type":"object","required":["steps","externals","edges"],"title":"ProjectLineageResponse","description":"Full project lineage DAG for the Foundry-style view."},"ProjectRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"is_favorite":{"type":"boolean","title":"Is Favorite","default":false},"codegen_in_progress":{"type":"boolean","title":"Codegen In Progress","default":false},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"doc_status":{"type":"string","title":"Doc Status","default":"idle"},"doc_status_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Doc Status Updated At"},"doc_last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doc Last Error"}},"type":"object","required":["id","company_id","user_id","name","description","is_suppressed","created_at","updated_at"],"title":"ProjectRead"},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"}},"type":"object","title":"ProjectUpdate"},"PromoteBody":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"Entity slug"},"description":{"type":"string","title":"Description","default":""},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"key_columns":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Key Columns","description":"Single-element list naming the column whose values become the entity's row identity. Required for file-backed Databases (CSV uploads) whose key_columns is empty; ignored otherwise."}},"type":"object","required":["name"],"title":"PromoteBody"},"PropertyBulkUpdate":{"properties":{"properties":{"items":{"$ref":"#/components/schemas/PropertyUpdate"},"type":"array","title":"Properties"}},"type":"object","required":["properties"],"title":"PropertyBulkUpdate","description":"Input for PATCH /ontology/entities/{id}/properties."},"PropertyUpdate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order"},"rules":{"anyOf":[{"$ref":"#/components/schemas/FieldRules"},{"type":"null"}]},"file_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"File Folder Id"}},"type":"object","required":["id"],"title":"PropertyUpdate","description":"Single property update in a bulk patch."},"ProviderActionRead":{"properties":{"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"params_json_schema":{"additionalProperties":true,"type":"object","title":"Params Json Schema"}},"type":"object","required":["key","display_name","description","params_json_schema"],"title":"ProviderActionRead"},"ProviderRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"icon":{"type":"string","title":"Icon"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"provider_type":{"type":"string","title":"Provider Type","default":"integration"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"nango_provider_config_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nango Provider Config Key"},"nango_webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nango Webhook Url"},"credential_schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Credential Schema"}},"type":"object","required":["id","name","display_name","icon","description","category"],"title":"ProviderRead"},"ProvisionNewUserResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"default_company_id":{"type":"string","format":"uuid","title":"Default Company Id"},"phase":{"type":"string","title":"Phase","description":"Which provisioning branch was taken: scim | invitation | personal"}},"type":"object","required":["user_id","default_company_id","phase"],"title":"ProvisionNewUserResponse","description":"Echoed for debugging only — front-end ignores the body."},"QueryRequest":{"properties":{"question":{"type":"string","title":"Question"}},"type":"object","required":["question"],"title":"QueryRequest"},"RecentError":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"root_step_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Step Title"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"},"trigger_source":{"type":"string","title":"Trigger Source"}},"type":"object","required":["id","run_id","project_id","project_name","root_step_title","status","started_at","finished_at","error","error_summary","trigger_source"],"title":"RecentError"},"RecentRun":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"root_step_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Step Title"},"status":{"type":"string","title":"Status"},"trigger_source":{"type":"string","title":"Trigger Source"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"}},"type":"object","required":["id","run_id","project_id","project_name","root_step_title","status","trigger_source","started_at","finished_at","error","error_summary"],"title":"RecentRun"},"RecordRelatedResponse":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"entity_display_name":{"type":"string","title":"Entity Display Name"},"record":{"additionalProperties":true,"type":"object","title":"Record"},"related":{"items":{"$ref":"#/components/schemas/RelatedRecordSet"},"type":"array","title":"Related"}},"type":"object","required":["entity_name","entity_display_name","record","related"],"title":"RecordRelatedResponse","description":"Response for GET /ontology/entities/{id}/records/{key}/related."},"RegenerateRequest":{"properties":{"branch_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Branch Id"}},"type":"object","title":"RegenerateRequest","description":"Optional body for regenerate.\n\n`branch_id` is the branch the client is actually on. It exists because the\nbranch switcher lets one editor hold several open work branches, so\nresolving by `(app_id, user_id)` alone picks between them arbitrarily —\nwhich in staging dispatched a Regenerate onto a branch the user was not\nlooking at. Optional so clients that have not been updated keep working;\nthey get the caller's default branch, exactly as before."},"RelatedEntity":{"properties":{"entity_id":{"type":"string","format":"uuid","title":"Entity Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"record_count":{"type":"integer","title":"Record Count"},"relationship_name":{"type":"string","title":"Relationship Name"},"relationship_type":{"type":"string","title":"Relationship Type"},"cardinality":{"type":"string","title":"Cardinality"},"direction":{"type":"string","title":"Direction"}},"type":"object","required":["entity_id","name","display_name","record_count","relationship_name","relationship_type","cardinality","direction"],"title":"RelatedEntity","description":"An entity in the connected subgraph."},"RelatedRecordSet":{"properties":{"entity_name":{"type":"string","title":"Entity Name"},"entity_display_name":{"type":"string","title":"Entity Display Name"},"relationship":{"type":"string","title":"Relationship"},"records":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Records"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["entity_name","entity_display_name","relationship","records","count"],"title":"RelatedRecordSet","description":"Related records for one entity."},"RelationshipCreate":{"properties":{"from_entity_id":{"type":"string","format":"uuid","title":"From Entity Id"},"to_entity_id":{"type":"string","format":"uuid","title":"To Entity Id"},"name":{"type":"string","title":"Name"},"relationship_type":{"type":"string","title":"Relationship Type"},"cardinality":{"type":"string","title":"Cardinality"},"from_key":{"type":"string","title":"From Key"},"to_key":{"type":"string","title":"To Key"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["from_entity_id","to_entity_id","name","relationship_type","cardinality","from_key","to_key"],"title":"RelationshipCreate","description":"Input for POST /ontology/relationships."},"RelationshipRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"from_entity_id":{"type":"string","format":"uuid","title":"From Entity Id"},"from_entity_name":{"type":"string","title":"From Entity Name","default":""},"to_entity_id":{"type":"string","format":"uuid","title":"To Entity Id"},"to_entity_name":{"type":"string","title":"To Entity Name","default":""},"name":{"type":"string","title":"Name"},"relationship_type":{"type":"string","title":"Relationship Type"},"cardinality":{"type":"string","title":"Cardinality"},"from_key":{"type":"string","title":"From Key"},"to_key":{"type":"string","title":"To Key"},"description":{"type":"string","title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","company_id","from_entity_id","to_entity_id","name","relationship_type","cardinality","from_key","to_key","description","created_at","updated_at"],"title":"RelationshipRead","description":"Full relationship for GET endpoints."},"RelationshipUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"relationship_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationship Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"RelationshipUpdate","description":"Input for PATCH /ontology/relationships/{id}."},"ResourceType":{"type":"string","enum":["project","database","folder","app","entity","automation","dashboard","file","file_folder","integration"],"title":"ResourceType","description":"Resources that can carry permissions. Polymorphic ``resource_id``."},"ResultDatasetColumn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[A-Za-z_][A-Za-z0-9_]{0,99}$","title":"Name"},"type":{"type":"string","enum":["String","Float64","Int64","Boolean","Date","Datetime"],"title":"Type"}},"type":"object","required":["name","type"],"title":"ResultDatasetColumn","description":"One business column in an Automation-owned result dataset."},"RlsAudienceType":{"type":"string","enum":["everyone","group","user"],"title":"RlsAudienceType","description":"Values for the ``audience_type`` column (stored as plain VARCHAR)."},"RlsOperator":{"type":"string","enum":["in","not_in","eq","neq","gte","lte","gt","lt"],"title":"RlsOperator","description":"Supported comparison operators for row-level security rules."},"RlsValueSource":{"type":"string","enum":["literal","user_attribute"],"title":"RlsValueSource","description":"Values for the ``value_source`` column (stored as plain VARCHAR)."},"RowAccessPolicyCreate":{"properties":{"column_name":{"type":"string","title":"Column Name"},"operator":{"$ref":"#/components/schemas/RlsOperator","default":"in"},"value_source":{"$ref":"#/components/schemas/RlsValueSource","default":"literal"},"values":{"items":{"type":"string"},"type":"array","title":"Values","default":[]},"attribute_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribute Key"},"audience_type":{"$ref":"#/components/schemas/RlsAudienceType","default":"everyone"},"audience_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Audience Id"}},"type":"object","required":["column_name"],"title":"RowAccessPolicyCreate"},"RowAccessPolicyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"resource_type":{"type":"string","title":"Resource Type"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"},"column_name":{"type":"string","title":"Column Name"},"operator":{"$ref":"#/components/schemas/RlsOperator"},"value_source":{"$ref":"#/components/schemas/RlsValueSource"},"values":{"items":{"type":"string"},"type":"array","title":"Values"},"attribute_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribute Key"},"audience_type":{"$ref":"#/components/schemas/RlsAudienceType"},"audience_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Audience Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","resource_type","resource_id","column_name","operator","value_source","values","attribute_key","audience_type","audience_id","created_at","updated_at"],"title":"RowAccessPolicyRead"},"RowAccessPolicyUpdate":{"properties":{"operator":{"anyOf":[{"$ref":"#/components/schemas/RlsOperator"},{"type":"null"}]},"values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Values"},"attribute_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attribute Key"}},"type":"object","title":"RowAccessPolicyUpdate"},"RulesPreviewItem":{"properties":{"column_name":{"type":"string","title":"Column Name"},"rules":{"$ref":"#/components/schemas/FieldRules"}},"type":"object","required":["column_name","rules"],"title":"RulesPreviewItem"},"RulesPreviewRequest":{"properties":{"properties":{"items":{"$ref":"#/components/schemas/RulesPreviewItem"},"type":"array","title":"Properties"}},"type":"object","required":["properties"],"title":"RulesPreviewRequest"},"RulesPreviewResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/RulesPreviewResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"RulesPreviewResponse"},"RulesPreviewResult":{"properties":{"column_name":{"type":"string","title":"Column Name"},"violating_count":{"type":"integer","title":"Violating Count"},"total_count":{"type":"integer","title":"Total Count"}},"type":"object","required":["column_name","violating_count","total_count"],"title":"RulesPreviewResult"},"RunCreate":{"properties":{"root_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Root Step Id"},"force_full":{"type":"boolean","title":"Force Full","default":false}},"additionalProperties":false,"type":"object","title":"RunCreate","description":"Trigger a new run.\n\n``root_step_id`` is the target output (a database step).\nNull ``root_step_id`` means Run All — run every active step in the project.\n\nProject runs intentionally expose execution controls only. Runtime\nparameters belong to an App-invoked Automation; rejecting unknown fields\nprevents obsolete clients from silently submitting ignored ``input_data``.\n\n``force_full`` bypasses the AI Lambda's content-addressed cache / the\ncustom Lambda's api_action ledger for this run only — used for manual\nreplays after schema changes or bug fixes. Cascade-created runs leave\nthis False (see spec §7d — force_full does not propagate through\ncascade)."},"RunDetailRead":{"properties":{"run":{"$ref":"#/components/schemas/domains__automations__schemas__RunRead"},"node_runs":{"items":{"$ref":"#/components/schemas/NodeRunRead"},"type":"array","title":"Node Runs"}},"type":"object","required":["run","node_runs"],"title":"RunDetailRead"},"RunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/RunTimelineEntry"},"type":"array","title":"Runs"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["runs"],"title":"RunListResponse"},"RunNowResponse":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"}},"type":"object","required":["run_id"],"title":"RunNowResponse"},"RunStats":{"properties":{"total":{"type":"integer","title":"Total"},"success":{"type":"integer","title":"Success"},"failed":{"type":"integer","title":"Failed"},"running":{"type":"integer","title":"Running"},"cancelled":{"type":"integer","title":"Cancelled"}},"type":"object","required":["total","success","failed","running","cancelled"],"title":"RunStats"},"RunStatus":{"type":"string","enum":["running","success","partial_success","failed"],"title":"RunStatus","description":"Status of an automation run (one fire)."},"RunTimelineEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","title":"Status"},"trigger_source":{"type":"string","title":"Trigger Source"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"root_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Root Step Id"},"force_full":{"type":"boolean","title":"Force Full"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"},"total_rows_processed":{"type":"integer","title":"Total Rows Processed","default":0},"step_count":{"type":"integer","title":"Step Count","default":0},"incremental_count":{"type":"integer","title":"Incremental Count","default":0},"full_count":{"type":"integer","title":"Full Count","default":0}},"type":"object","required":["id","status","trigger_source","force_full","started_at","finished_at"],"title":"RunTimelineEntry","description":"One Run as seen by the project timeline view."},"RunnableActionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"kind":{"$ref":"#/components/schemas/ActionKind"},"parameters":{"items":{"$ref":"#/components/schemas/ParameterRead"},"type":"array","title":"Parameters"}},"type":"object","required":["id","display_name","kind","parameters"],"title":"RunnableActionRead"},"Severity":{"type":"string","enum":["compatible","partial","risky","no_match"],"title":"Severity"},"SheetAnalysis":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"header_row_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Header Row Index"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"preview_rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"Preview Rows"},"fail_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fail Reason"}},"type":"object","title":"SheetAnalysis","description":"Per-sheet analyzer output served by the upload wizard.\n\nFor CSV the wizard returns exactly one entry with ``name=None``. For\nxlsx/xlsm, one entry per sheet in workbook order. ``preview_rows`` holds the\nfirst ~10 raw rows (pre-skip) so the frontend can re-render the preview\nclient-side as the user changes the skip-rows input."},"SinkTarget":{"type":"string","enum":["database"],"title":"SinkTarget","description":"Where a data_sink step writes its output."},"SmartInsight":{"properties":{"icon":{"type":"string","title":"Icon"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"action_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Label"}},"type":"object","required":["icon","title","description"],"title":"SmartInsight"},"SnowflakeColumnSchema":{"properties":{"name":{"type":"string","title":"Name"},"polars_type":{"type":"string","title":"Polars Type"}},"type":"object","required":["name","polars_type"],"title":"SnowflakeColumnSchema","description":"One column from ``DESCRIBE TABLE`` mapped to a Polars-style type.\n\nThe wizard echoes this list back in the ``crawler_table_configs``\nPATCH so the lifecycle layer can populate ``Database.schema_info``\nwithout a fresh round-trip."},"SnowflakeDiscoveryItem":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"}},"type":"object","required":["id","label"],"title":"SnowflakeDiscoveryItem","description":"Item returned by SHOW DATABASES / SHOW SCHEMAS / SHOW TABLES.\n\n``id`` is the namespaced selector the wizard later passes back —\ne.g. ``\"ANALYTICS\"`` for a database, ``\"ANALYTICS.PUBLIC\"`` for a\nschema, ``\"ANALYTICS.PUBLIC.ORDERS\"`` for a table. ``hint`` holds\noptional metadata (row count, comment) for UI tooltips."},"SourceKind":{"type":"string","enum":["const","param"],"title":"SourceKind","description":"Where a field-write's value comes from."},"StatusBanner":{"properties":{"status":{"type":"string","title":"Status"},"headline":{"type":"string","title":"Headline"},"summary":{"type":"string","title":"Summary"},"health_score":{"type":"integer","title":"Health Score"}},"type":"object","required":["status","headline","summary","health_score"],"title":"StatusBanner"},"StepBatchItem":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""},"step_type":{"$ref":"#/components/schemas/StepType"},"code_type":{"$ref":"#/components/schemas/CodeType","default":"python"},"sink_target":{"anyOf":[{"$ref":"#/components/schemas/SinkTarget"},{"type":"null"}]},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"parent_slugs":{"items":{"type":"string"},"type":"array","title":"Parent Slugs","default":[]},"in_format":{"type":"string","title":"In Format","default":""},"out_format":{"type":"string","title":"Out Format","default":""},"code_url":{"type":"string","title":"Code Url","default":""},"referenced_database_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Referenced Database Ids","default":[]},"referenced_entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Referenced Entity Ids","default":[]},"input_schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Schema"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"operator_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Config"}},"type":"object","required":["slug","step_type"],"title":"StepBatchItem","description":"One step in a batch replace."},"StepBatchReplace":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/StepBatchItem"},"type":"array","title":"Steps"}},"type":"object","required":["steps"],"title":"StepBatchReplace","description":"Replace all steps in a project (used at deploy time)."},"StepCodeChatRequest":{"properties":{"content":{"type":"string","title":"Content"},"attachments":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Attachments","default":[]}},"type":"object","required":["content"],"title":"StepCodeChatRequest"},"StepCodeUpdate":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"StepCodeUpdate","description":"Verbatim replacement of a custom_code step's Python source."},"StepCreate":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title","default":""},"description":{"type":"string","title":"Description","default":""},"step_type":{"$ref":"#/components/schemas/StepType"},"code_type":{"$ref":"#/components/schemas/CodeType","default":"python"},"sink_target":{"anyOf":[{"$ref":"#/components/schemas/SinkTarget"},{"type":"null"}]},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"parent_step_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Parent Step Ids","default":[]},"in_format":{"type":"string","title":"In Format","default":""},"out_format":{"type":"string","title":"Out Format","default":""},"input_schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Schema"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"operator_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Config"}},"type":"object","required":["slug","step_type"],"title":"StepCreate","description":"Create a new step in a project DAG."},"StepOutputQueryRequest":{"properties":{"sql":{"type":"string","title":"Sql"},"table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table"}},"type":"object","required":["sql"],"title":"StepOutputQueryRequest"},"StepOutputResponse":{"properties":{"format":{"type":"string","title":"Format"},"table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Table"},"available_tables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Tables"},"schema":{"anyOf":[{"items":{"$ref":"#/components/schemas/StepOutputSchemaField"},"type":"array"},{"type":"null"}],"title":"Schema"},"rows":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Rows"},"row_count_sample":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count Sample"},"row_count_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Count Total"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"},"step_run":{"$ref":"#/components/schemas/StepRunSummary"}},"type":"object","required":["format","step_run"],"title":"StepOutputResponse"},"StepOutputSchemaField":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["name","type"],"title":"StepOutputSchemaField"},"StepRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"step_type":{"$ref":"#/components/schemas/StepType"},"code_type":{"$ref":"#/components/schemas/CodeType"},"sink_target":{"anyOf":[{"$ref":"#/components/schemas/SinkTarget"},{"type":"null"}]},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"parent_step_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Parent Step Ids"},"order":{"type":"integer","title":"Order"},"code_url":{"type":"string","title":"Code Url"},"in_format":{"type":"string","title":"In Format"},"out_format":{"type":"string","title":"Out Format"},"referenced_database_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Referenced Database Ids"},"referenced_entity_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Referenced Entity Ids","default":[]},"input_schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Schema"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"operator_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Config"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"},"entity_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Entity Id"},"status":{"type":"string","title":"Status","default":"active"},"is_suppressed":{"type":"boolean","title":"Is Suppressed"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"database_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Database Name"},"trigger":{"anyOf":[{"$ref":"#/components/schemas/TriggerRead"},{"type":"null"}]}},"type":"object","required":["id","project_id","company_id","user_id","slug","title","description","step_type","code_type","sink_target","provider_id","parent_step_ids","order","code_url","in_format","out_format","referenced_database_ids","input_schema","is_suppressed","created_at","updated_at"],"title":"StepRead","description":"Step response."},"StepRunRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"run_id":{"type":"string","format":"uuid","title":"Run Id"},"step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Step Id"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"rows_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Processed"},"output_row_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Row Count"},"rows_new":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows New"},"rows_changed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Changed"},"rows_removed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Removed"},"ai_rows_cached":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Rows Cached"},"ai_rows_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ai Rows Processed"}},"type":"object","required":["id","run_id","step_id","status","error","logs","started_at","finished_at"],"title":"StepRunRead","description":"StepRun response."},"StepRunRowsResponse":{"properties":{"step_run_id":{"type":"string","format":"uuid","title":"Step Run Id"},"rows_processed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows Processed"},"total_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Rows"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"truncated":{"type":"boolean","title":"Truncated"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["step_run_id","rows_processed","rows","truncated"],"title":"StepRunRowsResponse","description":"Head-sample of rows in a single StepRun's step output.\n\nIncremental-rethink Task 13 dropped the watermark-window slicing this\nused to do (``execution_mode_used`` / ``output_watermark`` no longer\nexist — every step always runs full, Task 10). This is now a plain\nhead-sample of the step's cumulative output parquet."},"StepRunSummary":{"properties":{"status":{"type":"string","title":"Status"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["status"],"title":"StepRunSummary"},"StepStats":{"properties":{"total":{"type":"integer","title":"Total"},"active":{"type":"integer","title":"Active"},"draft":{"type":"integer","title":"Draft"},"paused":{"type":"integer","title":"Paused"},"archived":{"type":"integer","title":"Archived"}},"type":"object","required":["total","active","draft","paused","archived"],"title":"StepStats"},"StepType":{"type":"string","enum":["source","data_read","process","data_sink","database","dashboard"],"title":"StepType","description":"The role a step plays in the project DAG."},"StepUpdate":{"properties":{"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"step_type":{"anyOf":[{"$ref":"#/components/schemas/StepType"},{"type":"null"}]},"code_type":{"anyOf":[{"$ref":"#/components/schemas/CodeType"},{"type":"null"}]},"sink_target":{"anyOf":[{"$ref":"#/components/schemas/SinkTarget"},{"type":"null"}]},"provider_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Id"},"parent_step_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Parent Step Ids"},"in_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Format"},"out_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Out Format"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"input_schema":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Schema"},"operator_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operator Type"},"operator_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Operator Config"}},"type":"object","title":"StepUpdate","description":"Patch a step (all fields optional)."},"SuppressionPreview":{"properties":{"databases":{"items":{"$ref":"#/components/schemas/DatabaseWithConsumers"},"type":"array","title":"Databases"},"owned_database_count":{"type":"integer","title":"Owned Database Count"}},"type":"object","required":["databases","owned_database_count"],"title":"SuppressionPreview"},"SwapCandidate":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["database","user_file"],"title":"Type"},"owner_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Owner Project Id"},"owner_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Project Name"},"is_shared":{"type":"boolean","title":"Is Shared"},"similarity_score":{"type":"number","title":"Similarity Score"},"severity":{"$ref":"#/components/schemas/Severity"},"diff":{"$ref":"#/components/schemas/SwapColumnDiff"}},"type":"object","required":["id","name","type","owner_project_id","owner_project_name","is_shared","similarity_score","severity","diff"],"title":"SwapCandidate"},"SwapCandidateList":{"properties":{"current_source":{"$ref":"#/components/schemas/SwapCurrentSource"},"candidates":{"items":{"$ref":"#/components/schemas/SwapCandidate"},"type":"array","title":"Candidates"}},"type":"object","required":["current_source","candidates"],"title":"SwapCandidateList"},"SwapColumn":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","default":""}},"type":"object","required":["name"],"title":"SwapColumn"},"SwapColumnDiff":{"properties":{"matching":{"items":{"type":"string"},"type":"array","title":"Matching"},"missing_in_candidate":{"items":{"type":"string"},"type":"array","title":"Missing In Candidate"},"extra_in_candidate":{"items":{"type":"string"},"type":"array","title":"Extra In Candidate"},"retyped":{"items":{"$ref":"#/components/schemas/SwapRetyped"},"type":"array","title":"Retyped"}},"type":"object","required":["matching","missing_in_candidate","extra_in_candidate","retyped"],"title":"SwapColumnDiff"},"SwapCurrentSource":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["database","user_file"],"title":"Type"},"columns":{"items":{"$ref":"#/components/schemas/SwapColumn"},"type":"array","title":"Columns"}},"type":"object","required":["id","name","type","columns"],"title":"SwapCurrentSource"},"SwapInputRequest":{"properties":{"target_id":{"type":"string","format":"uuid","title":"Target Id"}},"type":"object","required":["target_id"],"title":"SwapInputRequest"},"SwapInputResponse":{"properties":{"step_id":{"type":"string","format":"uuid","title":"Step Id"},"status":{"type":"string","enum":["ok","no_op"],"title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["step_id","status","message"],"title":"SwapInputResponse"},"SwapRetyped":{"properties":{"name":{"type":"string","title":"Name"},"current_type":{"type":"string","title":"Current Type"},"candidate_type":{"type":"string","title":"Candidate Type"}},"type":"object","required":["name","current_type","candidate_type"],"title":"SwapRetyped"},"TaggedEntity":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"}},"type":"object","required":["id","name"],"title":"TaggedEntity"},"TriggerCreate":{"properties":{"trigger_type":{"$ref":"#/components/schemas/TriggerType"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config","default":{}}},"type":"object","required":["trigger_type"],"title":"TriggerCreate","description":"Attach a trigger to a root step."},"TriggerRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"step_id":{"type":"string","format":"uuid","title":"Step Id"},"trigger_type":{"$ref":"#/components/schemas/TriggerType"},"trigger_config":{"additionalProperties":true,"type":"object","title":"Trigger Config"},"is_active":{"type":"boolean","title":"Is Active"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","step_id","trigger_type","trigger_config","is_active","last_triggered_at","created_at"],"title":"TriggerRead","description":"Trigger response."},"TriggerType":{"type":"string","enum":["on_click","schedule"],"title":"TriggerType","description":"How a root step can be triggered.\n\nEVENT (polling) was deprecated in commit c523d2be (2026-05-02) and\ndeleted entirely in Phase 5: cross-dataset reactive updates use the\ncascade model (database_dep) instead. ON_CLICK is implicit (every\ndataset can be refreshed manually via the UI, no row needed) and is\nonly kept here for the rejection branch in CreateTrigger."},"UpdateStepRequest":{"properties":{"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["config"],"title":"UpdateStepRequest"},"UsedByProject":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"}},"type":"object","required":["project_id","project_name"],"title":"UsedByProject"},"UserFileMove":{"properties":{"target_folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Folder Id"}},"type":"object","title":"UserFileMove","description":"POST /files/{id}/move payload — destination folder (None = root)."},"UserFileRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"name":{"type":"string","title":"Name"},"file_type":{"type":"string","title":"File Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"parse_state":{"type":"string","title":"Parse State"}},"type":"object","required":["id","company_id","user_id","name","file_type","size_bytes","meta","created_at","parse_state"],"title":"UserFileRead"},"UserFileRename":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"UserFileRename","description":"Request payload for ``PATCH /files/{id}``."},"UserFileSearchResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"folder_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Folder Id"},"name":{"type":"string","title":"Name"},"file_type":{"type":"string","title":"File Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"parse_state":{"type":"string","title":"Parse State"},"folder_path":{"type":"string","title":"Folder Path","default":""}},"type":"object","required":["id","company_id","user_id","name","file_type","size_bytes","meta","created_at","parse_state"],"title":"UserFileSearchResult","description":"A file search hit — a UserFileRead plus the path of its containing folder."},"UserFileUploadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"file_type":{"type":"string","title":"File Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"replaced":{"type":"boolean","title":"Replaced","default":false},"state":{"type":"string","title":"State","default":"committed"},"sheets":{"items":{"$ref":"#/components/schemas/SheetAnalysis"},"type":"array","title":"Sheets"},"databases":{"items":{"$ref":"#/components/schemas/DatabaseStub"},"type":"array","title":"Databases"}},"type":"object","required":["id","name","file_type","size_bytes","created_at"],"title":"UserFileUploadResponse"},"UserPermissionRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"resource_type":{"$ref":"#/components/schemas/ResourceType"},"resource_id":{"type":"string","format":"uuid","title":"Resource Id"},"resource_name":{"type":"string","title":"Resource Name"},"level":{"$ref":"#/components/schemas/PermissionLevel"}},"type":"object","required":["id","resource_type","resource_id","resource_name","level"],"title":"UserPermissionRead","description":"Permission with resource name for display in user permission lists."},"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"},"WorkflowChatRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"automation_id":{"type":"string","format":"uuid","title":"Automation Id"},"chat_type":{"type":"string","title":"Chat Type"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","automation_id","chat_type","status"],"title":"WorkflowChatRead"},"WorkflowMessageRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"WorkflowMessageRequest"},"WorkflowTurnResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"WorkflowTurnResponse"},"_JoinAdvisorFollowupRequest":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"_JoinAdvisorFollowupRequest"},"domains__automations__schemas__RunRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"automation_id":{"type":"string","format":"uuid","title":"Automation Id"},"triggered_by":{"type":"string","title":"Triggered By"},"triggered_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Triggered By User Id"},"source_app_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source App Id"},"scenario_revision_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Scenario Revision Id"},"result_refs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Result Refs"},"status":{"$ref":"#/components/schemas/RunStatus"},"started_at":{"type":"string","title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"item_count_total":{"type":"integer","title":"Item Count Total"},"item_count_failed":{"type":"integer","title":"Item Count Failed"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"}},"type":"object","required":["id","automation_id","triggered_by","triggered_by_user_id","source_app_id","scenario_revision_id","result_refs","status","started_at","ended_at","item_count_total","item_count_failed","error_summary"],"title":"RunRead"},"domains__automations__schemas__TriggerUpdate":{"properties":{"kind":{"type":"string","title":"Kind"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["kind"],"title":"TriggerUpdate","description":"Swap the single trigger node's kind + config, preserving its slug, id, and edges."},"domains__ontology__schemas__EntityRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"key_column":{"type":"string","title":"Key Column"},"record_count":{"type":"integer","title":"Record Count"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"properties":{"items":{"$ref":"#/components/schemas/EntityPropertyRead"},"type":"array","title":"Properties","default":[]},"relationships":{"items":{"$ref":"#/components/schemas/EntityRelationshipBrief"},"type":"array","title":"Relationships","default":[]},"fed_by":{"items":{"$ref":"#/components/schemas/FedByProject"},"type":"array","title":"Fed By","default":[]},"is_editable":{"type":"boolean","title":"Is Editable","default":false},"is_file_backed":{"type":"boolean","title":"Is File Backed","default":false},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"source_row_count":{"type":"integer","title":"Source Row Count","default":0},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"is_refreshing":{"type":"boolean","title":"Is Refreshing","default":false}},"type":"object","required":["id","company_id","name","display_name","description","database_id","key_column","record_count","status","created_at","updated_at"],"title":"EntityRead","description":"Full entity for GET endpoints."},"domains__pipelines__schemas__RunRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"company_id":{"type":"string","format":"uuid","title":"Company Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"root_step_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Root Step Id"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Summary"},"trigger_source":{"type":"string","title":"Trigger Source"},"source_run_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Run Id"},"temporal_workflow_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Temporal Workflow Id"},"force_full":{"type":"boolean","title":"Force Full","default":false},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"step_runs":{"items":{"$ref":"#/components/schemas/StepRunRead"},"type":"array","title":"Step Runs","default":[]}},"type":"object","required":["id","project_id","company_id","user_id","root_step_id","status","error","error_summary","trigger_source","temporal_workflow_id","started_at","finished_at"],"title":"RunRead","description":"Run response."},"domains__pipelines__schemas__TriggerUpdate":{"properties":{"trigger_type":{"anyOf":[{"$ref":"#/components/schemas/TriggerType"},{"type":"null"}]},"trigger_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Trigger Config"}},"type":"object","title":"TriggerUpdate","description":"Patch a trigger."},"domains__projects__schemas__EntityRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"order":{"type":"integer","title":"Order"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","order","status"],"title":"EntityRead","description":"Entity response for lineage view."}}}}