{
  "openapi": "3.1.0",
  "info": {
    "title": "Software Factory portal",
    "version": "0.1.0"
  },
  "paths": {
    "/api/auth/login": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Login",
        "operationId": "login_api_auth_login_get",
        "parameters": [
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Next"
            }
          },
          {
            "name": "app_challenge",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "App Challenge"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/callback": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Callback",
        "operationId": "callback_api_auth_callback_get",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "name": "error_description",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Error Description"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/app/session": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "App Session",
        "description": "Sign in a native app with the code from its login redirect.",
        "operationId": "app_session_api_auth_app_session_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppSession"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Logout",
        "operationId": "logout_api_auth_logout_post",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        }
      }
    },
    "/api/auth/me": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Me",
        "operationId": "me_api_auth_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Me Api Auth Me Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/auth/workspace": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Switch Workspace",
        "operationId": "switch_workspace_api_auth_workspace_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwitchWorkspace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/github/install": {
      "get": {
        "tags": [
          "github"
        ],
        "summary": "Install",
        "operationId": "install_api_github_install_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/github/install-link": {
      "post": {
        "tags": [
          "github"
        ],
        "summary": "Install Link",
        "description": "A link for a native app to open the install in a browser, which has no session of its own.",
        "operationId": "install_link_api_github_install_link_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object",
                  "title": "Response Install Link Api Github Install Link Post"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/github/app-install": {
      "get": {
        "tags": [
          "github"
        ],
        "summary": "App Install",
        "operationId": "app_install_api_github_app_install_get",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Code"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/github/setup": {
      "get": {
        "tags": [
          "github"
        ],
        "summary": "Setup",
        "description": "GitHub sends the user here after they install or change the GitHub App.",
        "operationId": "setup_api_github_setup_get",
        "parameters": [
          {
            "name": "installation_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Installation Id"
            }
          },
          {
            "name": "setup_action",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Setup Action"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/github/installations": {
      "get": {
        "tags": [
          "github"
        ],
        "summary": "List Installations",
        "operationId": "list_installations_api_github_installations_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Installations Api Github Installations Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/github/installations/{installation_id}/repos": {
      "get": {
        "tags": [
          "github"
        ],
        "summary": "List Repos",
        "operationId": "list_repos_api_github_installations__installation_id__repos_get",
        "parameters": [
          {
            "name": "installation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Installation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Repos Api Github Installations  Installation Id  Repos Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "github"
        ],
        "summary": "Create Repo",
        "operationId": "create_repo_api_github_installations__installation_id__repos_post",
        "parameters": [
          {
            "name": "installation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Installation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRepo"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Repo Api Github Installations  Installation Id  Repos Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/projects": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "List Projects",
        "operationId": "list_projects_api_projects_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Projects Api Projects Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Create Project",
        "operationId": "create_project_api_projects_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProject"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Create Project Api Projects Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/projects/{project_id}": {
      "get": {
        "tags": [
          "projects"
        ],
        "summary": "Get Project",
        "operationId": "get_project_api_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": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Project Api Projects  Project Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "patch": {
        "tags": [
          "projects"
        ],
        "summary": "Update Project",
        "operationId": "update_project_api_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/UpdateProject"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Project Api Projects  Project Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "projects"
        ],
        "summary": "Delete Project",
        "operationId": "delete_project_api_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"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/projects/{project_id}/repos/{repo_link_id}/default": {
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Make Default",
        "operationId": "make_default_api_projects__project_id__repos__repo_link_id__default_post",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "repo_link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Repo Link Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Make Default Api Projects  Project Id  Repos  Repo Link Id  Default Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/projects/{project_id}/repos": {
      "post": {
        "tags": [
          "projects"
        ],
        "summary": "Add Repo",
        "description": "Add an additional repo that agents can use with the default repo.",
        "operationId": "add_repo_api_projects__project_id__repos_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/RepoRef"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Add Repo Api Projects  Project Id  Repos Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/projects/{project_id}/repos/{repo_link_id}": {
      "delete": {
        "tags": [
          "projects"
        ],
        "summary": "Remove Repo",
        "operationId": "remove_repo_api_projects__project_id__repos__repo_link_id__delete",
        "parameters": [
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Project Id"
            }
          },
          {
            "name": "repo_link_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Repo Link Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace": {
      "patch": {
        "tags": [
          "workspace"
        ],
        "summary": "Update Workspace",
        "operationId": "update_workspace_api_workspace_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspace"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Update Workspace Api Workspace Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace/members": {
      "get": {
        "tags": [
          "workspace"
        ],
        "summary": "List Members",
        "operationId": "list_members_api_workspace_members_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Members Api Workspace Members Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace/members/{user_id}": {
      "patch": {
        "tags": [
          "workspace"
        ],
        "summary": "Update Member",
        "operationId": "update_member_api_workspace_members__user_id__patch",
        "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/UpdateMember"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Update Member Api Workspace Members  User Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "workspace"
        ],
        "summary": "Remove Member",
        "description": "Remove a member. Any member can remove themselves to leave the workspace.",
        "operationId": "remove_member_api_workspace_members__user_id__delete",
        "parameters": [
          {
            "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"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace/invites": {
      "get": {
        "tags": [
          "invites"
        ],
        "summary": "List Invites",
        "operationId": "list_invites_api_workspace_invites_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response List Invites Api Workspace Invites Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "post": {
        "tags": [
          "invites"
        ],
        "summary": "Invite Username",
        "operationId": "invite_username_api_workspace_invites_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UsernameInvite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Invite Username Api Workspace Invites Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace/invite-links": {
      "post": {
        "tags": [
          "invites"
        ],
        "summary": "Create Link",
        "operationId": "create_link_api_workspace_invite_links_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteRole"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Create Link Api Workspace Invite Links Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/workspace/invites/{invite_id}": {
      "delete": {
        "tags": [
          "invites"
        ],
        "summary": "Revoke Invite",
        "operationId": "revoke_invite_api_workspace_invites__invite_id__delete",
        "parameters": [
          {
            "name": "invite_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Invite Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/invites/{token}": {
      "get": {
        "tags": [
          "invites"
        ],
        "summary": "Get Link",
        "operationId": "get_link_api_invites__token__get",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Link Api Invites  Token  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/invites/{token}/accept": {
      "post": {
        "tags": [
          "invites"
        ],
        "summary": "Accept Link",
        "operationId": "accept_link_api_invites__token__accept_post",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Accept Link Api Invites  Token  Accept Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/integrations": {
      "get": {
        "tags": [
          "integrations"
        ],
        "summary": "List Integrations",
        "operationId": "list_integrations_api_integrations_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response List Integrations Api Integrations Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/integrations/daytona": {
      "put": {
        "tags": [
          "integrations"
        ],
        "summary": "Connect Daytona",
        "operationId": "connect_daytona_api_integrations_daytona_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DaytonaSettings"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Connect Daytona Api Integrations Daytona Put"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "integrations"
        ],
        "summary": "Disconnect Daytona",
        "operationId": "disconnect_daytona_api_integrations_daytona_delete",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/integrations/daytona/check": {
      "post": {
        "tags": [
          "integrations"
        ],
        "summary": "Check Daytona",
        "description": "Test the stored key again, for example after it was revoked or changed in Daytona.",
        "operationId": "check_daytona_api_integrations_daytona_check_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Check Daytona Api Integrations Daytona Check Post"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/environments": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Environments",
        "description": "Sandbox providers the composer can offer, with their sizes and list prices.",
        "operationId": "environments_api_threads_environments_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "type": "array",
                  "title": "Response Environments Api Threads Environments Get"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Create Thread",
        "operationId": "create_thread_api_threads_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateThread"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Thread Api Threads Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "List Threads",
        "operationId": "list_threads_api_threads_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": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response List Threads Api Threads Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Get Thread",
        "operationId": "get_thread_api_threads__thread_id__get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Thread Api Threads  Thread Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      },
      "delete": {
        "tags": [
          "threads"
        ],
        "summary": "Delete Thread",
        "operationId": "delete_thread_api_threads__thread_id__delete",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/messages": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Post Message",
        "operationId": "post_message_api_threads__thread_id__messages_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostMessage"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Post Message Api Threads  Thread Id  Messages Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/agent/abort": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Abort Turn",
        "description": "Stop the agent's running turn. It ends as interrupted.",
        "operationId": "abort_turn_api_threads__thread_id__agent_abort_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/events": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Agent Events",
        "description": "The agent's events as Server-Sent Events: the stored ones after `after` (or Last-Event-ID), then live ones.",
        "operationId": "agent_events_api_threads__thread_id__events_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "title": "After"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/attachments/{attachment_id}": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Get Attachment",
        "description": "An image from the agent's events, such as a screenshot. Events name it in a tool call's `images`.",
        "operationId": "get_attachment_api_threads__thread_id__attachments__attachment_id__get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Attachment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The image",
            "content": {
              "image/png": {}
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/start": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Start Sandbox",
        "operationId": "start_sandbox_api_threads__thread_id__sandbox_start_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Start Sandbox Api Threads  Thread Id  Sandbox Start Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/stop": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Stop Sandbox",
        "operationId": "stop_sandbox_api_threads__thread_id__sandbox_stop_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Stop Sandbox Api Threads  Thread Id  Sandbox Stop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Details",
        "description": "System info, runtime and an estimated cost, from the provider's list prices.",
        "operationId": "sandbox_details_api_threads__thread_id__sandbox_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Sandbox Details Api Threads  Thread Id  Sandbox Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/metrics": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Metrics",
        "operationId": "sandbox_metrics_api_threads__thread_id__sandbox_metrics_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Sandbox Metrics Api Threads  Thread Id  Sandbox Metrics Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/ports": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Ports",
        "operationId": "sandbox_ports_api_threads__thread_id__sandbox_ports_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  },
                  "title": "Response Sandbox Ports Api Threads  Thread Id  Sandbox Ports Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/ports/{port}/url": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Port Url",
        "operationId": "sandbox_port_url_api_threads__thread_id__sandbox_ports__port__url_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          },
          {
            "name": "port",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Port"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Sandbox Port Url Api Threads  Thread Id  Sandbox Ports  Port  Url Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/files": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Files",
        "operationId": "sandbox_files_api_threads__thread_id__sandbox_files_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Path"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Sandbox Files Api Threads  Thread Id  Sandbox Files Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/sandbox/processes": {
      "get": {
        "tags": [
          "threads"
        ],
        "summary": "Sandbox Processes",
        "operationId": "sandbox_processes_api_threads__thread_id__sandbox_processes_get",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "title": "Response Sandbox Processes Api Threads  Thread Id  Sandbox Processes Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/terminal": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Terminal",
        "description": "A signed URL for the sandbox's web terminal. It never carries the provider's API key.",
        "operationId": "terminal_api_threads__thread_id__terminal_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Terminal Api Threads  Thread Id  Terminal Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/threads/{thread_id}/desktop": {
      "post": {
        "tags": [
          "threads"
        ],
        "summary": "Desktop",
        "description": "Start the sandbox desktop and return a signed URL for it.",
        "operationId": "desktop_api_threads__thread_id__desktop_post",
        "parameters": [
          {
            "name": "thread_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Thread Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  },
                  "title": "Response Desktop Api Threads  Thread Id  Desktop Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "session": []
          }
        ]
      }
    },
    "/api/health": {
      "get": {
        "summary": "Health",
        "operationId": "health_api_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object",
                  "title": "Response Health Api Health Get"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppSession": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "code_verifier": {
            "type": "string",
            "maxLength": 128,
            "minLength": 43,
            "title": "Code Verifier"
          }
        },
        "type": "object",
        "required": [
          "code",
          "code_verifier"
        ],
        "title": "AppSession"
      },
      "CreateProject": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "default_repo": {
            "$ref": "#/components/schemas/RepoRef"
          }
        },
        "type": "object",
        "required": [
          "name",
          "default_repo"
        ],
        "title": "CreateProject"
      },
      "CreateRepo": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^[A-Za-z0-9._-]+$",
            "title": "Name"
          },
          "private": {
            "type": "boolean",
            "title": "Private",
            "default": true
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 350
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "CreateRepo"
      },
      "CreateThread": {
        "properties": {
          "project_id": {
            "type": "string",
            "format": "uuid",
            "title": "Project Id"
          },
          "prompt": {
            "type": "string",
            "maxLength": 20000,
            "minLength": 1,
            "title": "Prompt"
          },
          "mode": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "title": "Mode",
            "default": "high"
          },
          "environment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Environment",
            "default": "daytona"
          },
          "size": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Size"
          }
        },
        "type": "object",
        "required": [
          "project_id",
          "prompt"
        ],
        "title": "CreateThread"
      },
      "DaytonaSettings": {
        "properties": {
          "api_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Api Key"
          },
          "api_url": {
            "type": "string",
            "maxLength": 300,
            "title": "Api Url",
            "default": "https://app.daytona.io/api"
          },
          "target": {
            "type": "string",
            "maxLength": 50,
            "minLength": 1,
            "title": "Target",
            "default": "us"
          }
        },
        "type": "object",
        "title": "DaytonaSettings"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InviteRole": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ],
            "title": "Role",
            "default": "member"
          }
        },
        "type": "object",
        "title": "InviteRole"
      },
      "PostMessage": {
        "properties": {
          "content": {
            "type": "string",
            "maxLength": 20000,
            "minLength": 1,
            "title": "Content"
          }
        },
        "type": "object",
        "required": [
          "content"
        ],
        "title": "PostMessage"
      },
      "RepoRef": {
        "properties": {
          "installation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Installation Id"
          },
          "repo_id": {
            "type": "integer",
            "title": "Repo Id"
          }
        },
        "type": "object",
        "required": [
          "installation_id",
          "repo_id"
        ],
        "title": "RepoRef"
      },
      "Role": {
        "type": "string",
        "enum": [
          "owner",
          "admin",
          "member"
        ],
        "title": "Role"
      },
      "SwitchWorkspace": {
        "properties": {
          "workspace_id": {
            "type": "string",
            "format": "uuid",
            "title": "Workspace Id"
          }
        },
        "type": "object",
        "required": [
          "workspace_id"
        ],
        "title": "SwitchWorkspace"
      },
      "UpdateMember": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/Role"
          }
        },
        "type": "object",
        "required": [
          "role"
        ],
        "title": "UpdateMember"
      },
      "UpdateProject": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "title": "UpdateProject"
      },
      "UpdateWorkspace": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "title": "Name"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "UpdateWorkspace"
      },
      "UsernameInvite": {
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ],
            "title": "Role",
            "default": "member"
          },
          "github_login": {
            "type": "string",
            "maxLength": 100,
            "minLength": 1,
            "pattern": "^@?[A-Za-z0-9-]+$",
            "title": "Github Login"
          }
        },
        "type": "object",
        "required": [
          "github_login"
        ],
        "title": "UsernameInvite"
      },
      "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"
      }
    },
    "securitySchemes": {
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "factory_session",
        "description": "Set by GET /api/auth/callback after GitHub sign-in."
      }
    }
  },
  "servers": [
    {
      "url": "http://localhost:8000",
      "description": "Local backend"
    }
  ]
}
