{
  "openapi": "3.1.0",
  "info": {
    "title": "AppKS API",
    "description": "AppKS collaborative development platform HTTP API.",
    "license": {
      "name": ""
    },
    "version": "0.1.0"
  },
  "paths": {
    "/api/v1/auth/2fa/backup-codes/regenerate": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Regenerate 2FA backup codes",
        "description": "After verifying the current password, generate a new set of backup codes for a user with 2FA enabled and replace the old backup codes. password must be encrypted with the current session RSA public key. Backup codes are returned in plaintext only once in this response; clients must prompt users to store them securely.",
        "operationId": "authRegenerateTwoFactorBackupCodes",
        "requestBody": {
          "description": "The current account password encrypted with RSA.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Regenerate2FABackupCodesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Backup codes have been regenerated; old backup codes are immediately invalidated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Regenerate2FABackupCodesResponse"
                }
              }
            }
          },
          "400": {
            "description": "2FA is not enabled, the password is incorrect, or RSA decryption failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database write or backup code hashing failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/2fa/disable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Disable two-factor authentication",
        "description": "Disable TOTP two-factor authentication for the current signed-in user. This requires verifying both the current password and a valid TOTP code or backup code. password must be encrypted with the current session RSA public key; a successfully verified backup code is consumed.",
        "operationId": "authDisableTwoFactor",
        "requestBody": {
          "description": "TOTP/backup code and the current password encrypted with RSA.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Disable2FAParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "2FA has been disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "2FA is not enabled, the verification code is incorrect, the password is incorrect, or RSA decryption failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/2fa/enable": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Initialize two-factor authentication setup",
        "description": "Generate a new TOTP secret, otpauth QR-code URI, and 10 one-time backup codes for the current signed-in user, and save them in a not-yet-enabled state. Clients must guide the user to scan the QR code and call /auth/2fa/verify with a dynamic code before 2FA is actually enabled. Backup codes are returned in plaintext only once in this response; frontends must remind users to store them securely.",
        "operationId": "authPrepareTwoFactorEnable",
        "responses": {
          "200": {
            "description": "2FA setup initialized successfully. Returns the secret, QR-code URI, and backup codes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Enable2FAResponse"
                }
              }
            }
          },
          "400": {
            "description": "The current user has already enabled 2FA.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database write or backup code hashing failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/2fa/status": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Get two-factor authentication status",
        "description": "Read the current signed-in user's TOTP two-factor authentication status, including whether it is enabled, the authentication method, and whether backup codes are still available.",
        "operationId": "authGetTwoFactorStatus",
        "responses": {
          "200": {
            "description": "Read successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Get2FAStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/2fa/verify": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Verify and enable two-factor authentication",
        "description": "After initializing with /auth/2fa/enable, submit the 6-digit TOTP code generated by the authenticator app. On success, the current user's 2FA status is set to enabled. A small clock drift of one 30-second window before or after is allowed.",
        "operationId": "authVerifyAndEnableTwoFactor",
        "requestBody": {
          "description": "The 6-digit TOTP code generated by the authenticator app.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Verify2FAParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "2FA has been enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "2FA has not been initialized, is already enabled, or the verification code is incorrect.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/captcha": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Get captcha image",
        "description": "Generate a one-time captcha image and store the plaintext captcha in the current session. Captchas are used for sensitive entry points such as login and sending registration email codes. Set rsa=true to return the current session RSA public key at the same time and reduce frontend initialization requests. The captcha is consumed after either successful or failed validation, so clients must fetch a new one after failure.",
        "operationId": "authGetCaptcha",
        "parameters": [
          {
            "name": "w",
            "in": "query",
            "description": "Captcha image width; allowed range is 80..=400.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 160
          },
          {
            "name": "h",
            "in": "query",
            "description": "Captcha image height; allowed range is 30..=200.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 64
          },
          {
            "name": "dark",
            "in": "query",
            "description": "Whether to generate a dark-mode captcha.",
            "required": true,
            "schema": {
              "type": "boolean"
            },
            "example": false
          },
          {
            "name": "rsa",
            "in": "query",
            "description": "Whether to include the RSA public key in the response.",
            "required": true,
            "schema": {
              "type": "boolean"
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "Captcha generated successfully. The base64 field is image data that can be used directly as img.src.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CaptchaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid captcha size.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Session write failed or RSA initialization failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/email": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Get current user verified email",
        "description": "Return the verified primary email for the current signed-in user. If no verified email is bound to the account, the email field is null.",
        "operationId": "authGetPrimaryEmail",
        "responses": {
          "200": {
            "description": "Read successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_EmailResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/email/change": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Request login email change",
        "description": "After verifying the current user password, send a confirmation link to the new email address. password must be encrypted with the current session RSA public key. The token in the confirmation link is valid for 1 hour by default; the actual email switch is completed by calling /auth/email/verify.",
        "operationId": "authRequestEmailChange",
        "requestBody": {
          "description": "The new email address and encrypted current account password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The confirmation email has been queued for delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The new email is empty, the password is incorrect, or RSA decryption failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "The current session is not authenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The new email is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Cache, email service, or database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/email/verify": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Confirm email change",
        "description": "Complete an email change using the token from the confirmation email. The endpoint checks again whether the target email is already taken, then marks old emails as unverified and inserts the new verified primary email in a transaction.",
        "operationId": "authVerifyEmailChange",
        "requestBody": {
          "description": "Email change confirmation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailVerifyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Email changed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The token is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The token is invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The target email was taken by another account before confirmation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Account login",
        "description": "Log in using a username or verified email. password must be a Base64 ciphertext encrypted with the public key returned by /auth/rsa; the first login attempt must include captcha. If the account has TOTP enabled, the first successful password check returns 400/two-factor required and records pending verification state in the session. Then submit username, password, and totp_code again in the same session to complete login. On success, the session is renewed, the current user is bound, and temporary RSA keys are cleared.",
        "operationId": "authLogin",
        "requestBody": {
          "description": "Login parameters. username accepts a username or email; password is an RSA-OAEP-SHA256 encrypted ciphertext; captcha is the captcha stored in the current session; totp_code is required only during the second verification step.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Login succeeded. The server establishes login state through the session cookie.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Captcha error, RSA decryption failure, or missing/incorrect TOTP.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User does not exist or password is incorrect; to reduce enumeration risk, incorrect passwords are also treated as user-not-found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database, cache, or session write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Log out",
        "description": "Clear the user identity and all temporary authentication data from the current session, including captcha, temporary RSA keys, and pending 2FA state. This endpoint is idempotent: unauthenticated users also receive a success response.",
        "operationId": "authLogout",
        "responses": {
          "200": {
            "description": "Logged out successfully, or the session was already unauthenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "500": {
            "description": "Session persistence failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Get current signed-in user context",
        "description": "Return the current user's basic profile, preferred language, timezone, and notification summary using the user_uid bound to the session. This endpoint is typically used to restore the login state when the frontend app starts.",
        "operationId": "authGetCurrentUser",
        "responses": {
          "200": {
            "description": "The current session is authenticated. Returns the user context.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ContextMe"
                }
              }
            }
          },
          "401": {
            "description": "The current session is unauthenticated or the login state has expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The user in the session no longer exists, has been disabled, or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/password/change": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "authChangePassword",
        "requestBody": {
          "description": "Password change parameters (passwords encrypted with session RSA public key)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Password changed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid password",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Register a new account",
        "description": "Create an account after validating username, email, password, captcha, and email verification code. password must be encrypted with the current session RSA public key; captcha and email_code are one-time credentials. On successful registration, the new user is written to the session and does not need to log in again.",
        "operationId": "authRegister",
        "requestBody": {
          "description": "Registration parameters. email_code comes from /auth/register/email-code; password is a Base64 ciphertext encrypted with RSA-OAEP-SHA256.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Registration succeeded; the current session is automatically signed in as the new user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Captcha error, email verification code error, weak password, RSA decryption failure, or missing required fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The username or email is already in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction, password hashing, cache, or session write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/register/email-code": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Send registration email verification code",
        "description": "After validating the captcha in the current session, send a 6-digit registration code to the target email address. The endpoint checks whether a verified email already exists and applies a per-email cooldown to prevent email bombing. The code is valid for 10 minutes by default.",
        "operationId": "authSendRegisterEmailCode",
        "requestBody": {
          "description": "The target email address and captcha from the current session.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterEmailCodeParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The verification email has been queued for delivery. Returns the code expiration time.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RegisterEmailCodeResponse"
                }
              }
            }
          },
          "400": {
            "description": "The captcha is incorrect, the email is empty, or requests are too frequent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The email is already used by another verified account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Cache write failed or the email service is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/reset-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Request password reset email",
        "description": "Submit an email address to send a password reset link if it belongs to an active user. To prevent user enumeration, the business logic attempts to return success whether the email exists, rate limits are triggered, or email delivery fails. Internally, the endpoint enforces a 60-second cooldown and a daily limit of 5 requests per email.",
        "operationId": "authRequestPasswordReset",
        "requestBody": {
          "description": "The email address that should receive the password reset link.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The request has been accepted; if the email exists, a reset email will be sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "500": {
            "description": "Rare unrecoverable server-side error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/reset-password/verify": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Confirm password reset",
        "description": "Set a new password using the token from the password reset email. password must be encrypted with the current session RSA public key; the new password is strength-checked and rehashed with Argon2id. The token is deleted immediately after successful use; expired or missing tokens fail.",
        "operationId": "authVerifyPasswordReset",
        "requestBody": {
          "description": "The reset token and new password encrypted with RSA.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordVerifyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Password reset succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "The token is invalid or expired, RSA decryption failed, or the password is too weak.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database update or password hashing failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/rsa": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Get login form RSA public key",
        "description": "Generate or reuse a temporary RSA-2048 key pair for the current browser session and return the public key in PKCS#1 PEM format. Clients should use this public key to encrypt sensitive fields such as passwords with RSA-OAEP-SHA256 before submitting login, registration, password reset, or 2FA disable requests. The private key is encrypted with AEAD and stored only in the server-side session; it is never returned to clients.",
        "operationId": "authGetRsaPublicKey",
        "responses": {
          "200": {
            "description": "Return the RSA public key available for the current session; if an unexpired key already exists in the session, reuse the existing public key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RsaResponse"
                }
              }
            }
          },
          "500": {
            "description": "APP_SESSION_SECRET is missing, RSA generation failed, or session write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/categories": {
      "get": {
        "tags": [
          "IM"
        ],
        "summary": "List categories",
        "operationId": "imCategoryList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Categories listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_ChannelCategory"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "IM"
        ],
        "operationId": "imCategoryCreate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Category creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCategoryParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Category created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/categories/{category_id}": {
      "put": {
        "tags": [
          "IM"
        ],
        "summary": "Update a category",
        "operationId": "imCategoryUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Category update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCategoryParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Category updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelCategory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or category not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "IM"
        ],
        "summary": "Delete a category",
        "operationId": "imCategoryDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Category deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or category not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels": {
      "get": {
        "tags": [
          "IM"
        ],
        "summary": "List channels",
        "operationId": "imChannelList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "channel_kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "category_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channels listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_ChannelDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "IM"
        ],
        "summary": "Create a channel",
        "operationId": "imChannelCreate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Channel creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChannelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Channel created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels/{channel_id}": {
      "get": {
        "tags": [
          "IM"
        ],
        "summary": "Get a channel",
        "operationId": "imChannelGet",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "IM"
        ],
        "summary": "Update a channel",
        "operationId": "imChannelUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Channel update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateChannelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Channel updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "IM"
        ],
        "summary": "Delete a channel",
        "operationId": "imChannelDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channel deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels/{channel_id}/join": {
      "post": {
        "tags": [
          "IM"
        ],
        "summary": "Join a channel",
        "operationId": "imMemberJoin",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Joined channel successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelMember"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels/{channel_id}/leave": {
      "post": {
        "tags": [
          "IM"
        ],
        "summary": "Leave a channel",
        "operationId": "imMemberLeave",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Left channel successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels/{channel_id}/members": {
      "get": {
        "tags": [
          "IM"
        ],
        "summary": "List channel members",
        "operationId": "imMemberList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Members listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_ChannelMember"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "IM"
        ],
        "summary": "Invite a member",
        "operationId": "imMemberInvite",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Invitation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteMemberParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Member invited successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or channel not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/im/workspaces/{workspace_name}/channels/{channel_id}/members/{user_id}": {
      "put": {
        "tags": [
          "IM"
        ],
        "summary": "Update member role",
        "operationId": "imMemberUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Member update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Member updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ChannelMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace, channel or member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "IM"
        ],
        "summary": "Kick a member",
        "operationId": "imMemberKick",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member kicked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace, channel or member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notifications for the current user",
        "operationId": "notificationList",
        "parameters": [
          {
            "name": "unread_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Notifications listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Notifications"
        ],
        "summary": "Clear all notifications (dismiss all)",
        "operationId": "notificationClearAll",
        "responses": {
          "200": {
            "description": "All notifications cleared",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_i64"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/blocks": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notification blocks for the current user",
        "operationId": "notificationListBlocks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocks listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationBlock"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Create a notification block",
        "operationId": "notificationCreateBlock",
        "requestBody": {
          "description": "Block creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBlockParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Block created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationBlock"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/blocks/{block_id}": {
      "delete": {
        "tags": [
          "Notifications"
        ],
        "summary": "Delete a notification block",
        "operationId": "notificationDeleteBlock",
        "parameters": [
          {
            "name": "block_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Block deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Block not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/deliveries": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notification deliveries for the current user",
        "operationId": "notificationListDeliveries",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/read-all": {
      "put": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark all notifications as read",
        "operationId": "notificationMarkAllAsRead",
        "responses": {
          "200": {
            "description": "All notifications marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_i64"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/subscriptions": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notification subscriptions for the current user",
        "operationId": "notificationListSubscriptions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscriptions listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationSubscription"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Create a notification subscription",
        "operationId": "notificationCreateSubscription",
        "requestBody": {
          "description": "Subscription creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSubscriptionParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Subscription created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationSubscription"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/subscriptions/{subscription_id}": {
      "put": {
        "tags": [
          "Notifications"
        ],
        "summary": "Update a notification subscription",
        "operationId": "notificationUpdateSubscription",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Subscription update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSubscriptionParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Subscription updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationSubscription"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Notifications"
        ],
        "summary": "Delete a notification subscription",
        "operationId": "notificationDeleteSubscription",
        "parameters": [
          {
            "name": "subscription_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscription deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Subscription not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/templates": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List notification templates (requires system admin)",
        "operationId": "notificationListTemplates",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Templates listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "System admin access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Create a notification template (requires system admin)",
        "operationId": "notificationCreateTemplate",
        "requestBody": {
          "description": "Template creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Template created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "System admin access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/templates/{template_id}": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "Get a notification template by ID (requires system admin)",
        "operationId": "notificationGetTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "System admin access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Notifications"
        ],
        "summary": "Update a notification template (requires system admin)",
        "operationId": "notificationUpdateTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Template update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Template updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "System admin access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Notifications"
        ],
        "summary": "Delete a notification template (requires system admin)",
        "operationId": "notificationDeleteTemplate",
        "parameters": [
          {
            "name": "template_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "System admin access required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/unread-count": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "Get unread notification count for the current user",
        "operationId": "notificationUnreadCount",
        "responses": {
          "200": {
            "description": "Unread count returned successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_i64"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/{notification_id}": {
      "delete": {
        "tags": [
          "Notifications"
        ],
        "summary": "Delete a notification",
        "operationId": "notificationDelete",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Notification deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/{notification_id}/deliveries": {
      "get": {
        "tags": [
          "Notifications"
        ],
        "summary": "List deliveries for a specific notification",
        "operationId": "notificationListDeliveriesForNotification",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_NotificationDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/{notification_id}/dismiss": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "summary": "Dismiss a notification",
        "operationId": "notificationDismiss",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Notification dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/notifications/{notification_id}/read": {
      "put": {
        "tags": [
          "Notifications"
        ],
        "summary": "Mark a notification as read",
        "operationId": "notificationMarkAsRead",
        "parameters": [
          {
            "name": "notification_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Notification marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_NotificationDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Notification not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/repos/invitations/accept": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Accept a repository invitation",
        "description": "Accepts a pending repository invitation using the token received via email.\nRequires authentication and a verified email address matching the invitation.\n\nEffects:\n- User is added as a repository member with the invited role\n- User is added to the workspace if not already a member\n- Invitation is marked as accepted\n\nReturns the accepted invitation with full metadata.",
        "operationId": "repoAcceptInvitation",
        "requestBody": {
          "description": "Invitation acceptance parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invitation accepted successfully. User is now a member of the repository.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoInvitation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired token, or email doesn't match invitation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already a member of this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/account": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get current user account",
        "description": "Returns the authenticated user's account information including:\n- Username, display name, and bio\n- Avatar URL\n- Account status and role\n- Last login and creation timestamps\n\nRequires authentication.",
        "operationId": "userGetAccount",
        "responses": {
          "200": {
            "description": "Account retrieved successfully. Returns user account with all metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_User"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update user account",
        "description": "Updates the authenticated user's account settings.\nRequires authentication.\n\nUpdatable fields:\n- username: New username (must be unique across the platform)\n- display_name: Human-readable display name\n- bio: Short biography text\n- visibility: Profile visibility (\"public\", \"private\", or \"internal\")\n\nAll fields are optional; only provided fields are updated.\nReturns the updated user account with all metadata.",
        "operationId": "userUpdateAccount",
        "requestBody": {
          "description": "Account update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserAccountParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Account updated successfully. Returns updated user account with all metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty username or unsupported visibility value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Username already taken",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Delete user account",
        "description": "Marks the authenticated user's account and all associated data for deletion.\nThe user's data is soft-deleted (marked as deleted, not physically removed).\nA restore link is sent to the user's verified email, valid for 30 days.\nRequires authentication and a verified email address.\n\nPreconditions:\n- User must have at least one verified email address\n- User must transfer or delete all owned workspaces\n- User must transfer or delete all owned repositories\n\nEffects:\n- All user data is soft-deleted (SSH keys, GPG keys, sessions, devices, etc.)\n- Current session is cleared\n- A restore token is generated and sent via email\n- Account can be restored within 30 days using the restore link\n\nReturns success message on completion.",
        "operationId": "userDeleteAccount",
        "responses": {
          "200": {
            "description": "Account marked for deletion. A restore link has been sent to your email.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Cannot delete: user still owns workspaces or repositories, or no verified email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/account/avatar": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Upload user avatar",
        "description": "Uploads a new avatar image for the authenticated user.\nRequires authentication. Accepts multipart/form-data with a single \"avatar\" field.\n\nSupported formats: PNG, JPEG, WebP, GIF (max 5MB).\n\nEffects:\n- Avatar image is stored in S3-compatible object storage\n- Previous avatar is deleted from storage\n- User's avatar URL is updated\n\nReturns the new avatar URL and storage key.",
        "operationId": "userUploadAvatar",
        "requestBody": {
          "description": "Avatar image file in a multipart form field named 'avatar'.",
          "content": {
            "multipart/form-data": {}
          }
        },
        "responses": {
          "200": {
            "description": "Avatar uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_AvatarData"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: unsupported file type or image too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or S3 storage failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/appearance": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get user appearance settings",
        "description": "Returns the authenticated user's UI appearance preferences including:\n- Theme (system, light, dark)\n- Color scheme (system, light, dark)\n- Density (compact, comfortable)\n- Font size (small, medium, large)\n- Editor theme\n- Markdown preview toggle\n- Reduced motion toggle\n\nIf no settings exist, defaults are created automatically.\nRequires authentication.",
        "operationId": "userGetAppearance",
        "responses": {
          "200": {
            "description": "Appearance settings retrieved successfully. Returns all UI preference settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserAppearance"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update user appearance settings",
        "description": "Updates the authenticated user's UI appearance preferences.\nRequires authentication.\n\nUpdatable fields:\n- theme: UI theme (\"system\", \"light\", \"dark\")\n- color_scheme: Color scheme (\"system\", \"light\", \"dark\")\n- density: UI density (\"compact\", \"comfortable\")\n- font_size: Font size (\"small\", \"medium\", \"large\")\n- editor_theme: Code editor theme name\n- markdown_preview: Enable/disable markdown live preview\n- reduced_motion: Enable/disable reduced motion\n\nAll fields are optional; only provided fields are updated.\nReturns the updated appearance settings.",
        "operationId": "userUpdateAppearance",
        "requestBody": {
          "description": "Appearance update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserAppearanceParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Appearance settings updated successfully. Returns all updated UI preferences.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserAppearance"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: unsupported theme, color scheme, density, or font size",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/blocks": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List blocked users",
        "description": "Returns a paginated list of users blocked by the authenticated user.\nRequires authentication.",
        "operationId": "userListBlocks",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of blocks to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of blocks to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blocked users listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserBlock"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/blocks/{target_user_id}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Block a user",
        "description": "Blocks the specified user. Once blocked, neither user can see the other's\ncontent or interact in shared channels. Requires authentication.",
        "operationId": "userBlockUser",
        "parameters": [
          {
            "name": "target_user_id",
            "in": "path",
            "description": "User ID to block",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BlockBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "User blocked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserBlock"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (e.g., blocking yourself)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already blocked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Unblock a user",
        "description": "Removes a previously applied block on the specified user. Requires authentication.",
        "operationId": "userUnblockUser",
        "parameters": [
          {
            "name": "target_user_id",
            "in": "path",
            "description": "User ID to unblock",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User unblocked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Block not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/follows": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List followed users",
        "description": "Returns a paginated list of users followed by the authenticated user.\nRequires authentication.",
        "operationId": "userListFollows",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of follows to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of follows to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Follows listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserFollow"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/follows/{target_user_id}": {
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Follow a user",
        "description": "Starts following the specified user. Requires authentication.",
        "operationId": "userFollowUser",
        "parameters": [
          {
            "name": "target_user_id",
            "in": "path",
            "description": "User ID to follow",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "User followed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserFollow"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (e.g., following yourself)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already following this user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Unfollow a user",
        "description": "Stops following the specified user. Requires authentication.",
        "operationId": "userUnfollowUser",
        "parameters": [
          {
            "name": "target_user_id",
            "in": "path",
            "description": "User ID to unfollow",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User unfollowed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Follow not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/keys/gpg": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List user GPG keys",
        "description": "Returns all GPG public keys registered by the authenticated user.\nKeys are sorted by creation date (newest first).\nOnly non-revoked keys are included.\nRequires authentication.",
        "operationId": "userListGpgKeys",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "GPG keys listed successfully. Returns array of GPG key objects with fingerprints and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserGpgKey"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Add a GPG key",
        "description": "Registers a new GPG public key for the authenticated user.\nRequires authentication.\n\nParameters:\n- public_key: ASCII-armored PGP public key block\n- key_id: Short key ID or full fingerprint\n- primary_email: Primary email associated with the key (optional)\n- expires_at: Optional expiration date for the key\n\nEffects:\n- Key fingerprint is computed and stored\n- Key is immediately usable for verifying signed commits/tags\n- Duplicate keys are rejected\n\nReturns the created GPG key with fingerprint and metadata.",
        "operationId": "userAddGpgKey",
        "requestBody": {
          "description": "GPG key creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGpgKeyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "GPG key added successfully. Returns the created key with fingerprint and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserGpgKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid PGP key format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "GPG key with this fingerprint already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/keys/gpg/{key_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Delete a GPG key",
        "description": "Revokes a GPG key belonging to the authenticated user.\nRequires authentication.\n\nEffects:\n- Key is marked as revoked (soft-deleted)\n- Key can no longer be used for verifying commits/tags\n- Revoked keys remain visible in key history\n\nReturns success message on completion.",
        "operationId": "userDeleteGpgKey",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "description": "GPG key ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "GPG key revoked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "GPG key not found or already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/keys/ssh": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List user SSH keys",
        "description": "Returns all SSH public keys registered by the authenticated user.\nKeys are sorted by creation date (newest first).\nOnly non-revoked keys are included.\nRequires authentication.",
        "operationId": "userListSshKeys",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSH keys listed successfully. Returns array of SSH key objects with fingerprints and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserSshKey"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Add an SSH key",
        "description": "Registers a new SSH public key for the authenticated user.\nRequires authentication.\n\nParameters:\n- title: Human-readable label for the key (e.g., \"Work Laptop\")\n- public_key: SSH public key string (supports RSA, Ed25519, ECDSA, DSA)\n- key_type: Key algorithm type (\"rsa\", \"ed25519\", \"ecdsa\", \"dsa\")\n- expires_at: Optional expiration date for the key\n\nEffects:\n- Key fingerprint is computed and stored\n- Key is immediately usable for Git operations\n- Duplicate keys are rejected\n\nReturns the created SSH key with fingerprint and metadata.",
        "operationId": "userAddSshKey",
        "requestBody": {
          "description": "SSH key creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSshKeyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "SSH key added successfully. Returns the created key with fingerprint and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserSshKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid key format, unsupported key type, or type mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "SSH key with this fingerprint already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/keys/ssh/{key_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Delete an SSH key",
        "description": "Revokes an SSH key belonging to the authenticated user.\nRequires authentication.\n\nEffects:\n- Key is marked as revoked (soft-deleted)\n- Key can no longer be used for Git operations\n- Revoked keys remain visible in key history\n\nReturns success message on completion.",
        "operationId": "userDeleteSshKey",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "description": "SSH key ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSH key revoked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "SSH key not found or already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/notifications": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get user notification settings",
        "description": "Returns the authenticated user's notification preferences including:\n- Email notification toggle\n- Web push notification toggle\n- Mention notification toggle\n- Review notification toggle\n- Security notification toggle\n- Marketing email toggle\n- Digest frequency (realtime, daily, weekly, off)\n\nIf no settings exist, defaults are created automatically.\nRequires authentication.",
        "operationId": "userGetNotifications",
        "responses": {
          "200": {
            "description": "Notification settings retrieved successfully. Returns all notification preferences.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserNotifySetting"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update user notification settings",
        "description": "Updates the authenticated user's notification preferences.\nRequires authentication.\n\nUpdatable fields:\n- email_notifications: Enable/disable email notifications\n- web_notifications: Enable/disable web push notifications\n- mention_notifications: Enable/disable @mention notifications\n- review_notifications: Enable/disable code review notifications\n- security_notifications: Enable/disable security notifications\n- marketing_emails: Enable/disable marketing emails\n- digest_frequency: Digest email frequency (\"realtime\", \"daily\", \"weekly\", \"off\")\n\nAll fields are optional; only provided fields are updated.\nReturns the updated notification settings.",
        "operationId": "userUpdateNotifications",
        "requestBody": {
          "description": "Notification settings update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserNotifySettingParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Notification settings updated successfully. Returns all updated preferences.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserNotifySetting"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: unsupported digest frequency",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/presence": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get user presence",
        "description": "Returns the current presence status for the authenticated user,\nincluding online/offline status, custom status text, and device information.\nRequires authentication.",
        "operationId": "userGetPresence",
        "responses": {
          "200": {
            "description": "Presence retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserPresence"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Presence not found for this user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update user presence",
        "description": "Updates the presence status for the authenticated user.\nSupports custom status text, emoji, device type, and IP address.\nCreates a new presence record if one does not exist.\nRequires authentication.",
        "operationId": "userUpdatePresence",
        "parameters": [
          {
            "name": "status",
            "in": "path",
            "description": "New presence status",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/PresenceStatus"
            }
          },
          {
            "name": "custom_status_text",
            "in": "path",
            "description": "Optional custom status text (e.g., \"In a meeting\")",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "custom_status_emoji",
            "in": "path",
            "description": "Optional custom status emoji (e.g., \":palm_tree:\")",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "device_type",
            "in": "path",
            "description": "Device type the user is currently using",
            "required": true,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/DeviceType"
                }
              ]
            }
          },
          {
            "name": "ip_address",
            "in": "path",
            "description": "IP address of the current session",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePresenceBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Presence updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserPresence"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/profile": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get user profile",
        "description": "Returns the authenticated user's public profile information including:\n- Full name and company\n- Location and website URL\n- Twitter username\n- Timezone and language\n- Profile README\n\nIf no profile exists, an empty profile is created automatically.\nRequires authentication.",
        "operationId": "userGetProfile",
        "responses": {
          "200": {
            "description": "Profile retrieved successfully. Returns all profile fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserProfile"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update user profile",
        "description": "Updates the authenticated user's public profile information.\nRequires authentication.\n\nUpdatable fields:\n- full_name: Full legal name or display name\n- company: Organization or company name\n- location: Geographic location (e.g., \"San Francisco, CA\")\n- website_url: Personal or company website URL\n- twitter_username: Twitter/X handle\n- timezone: IANA timezone identifier (e.g., \"America/New_York\")\n- language: Preferred language code (e.g., \"en\", \"zh-CN\")\n- profile_readme: Markdown content for profile README\n\nAll fields are optional; only provided fields are updated.\nReturns the updated profile with all fields.",
        "operationId": "userUpdateProfile",
        "requestBody": {
          "description": "Profile update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserProfileParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Profile updated successfully. Returns all updated profile fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_UserProfile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/devices": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List user devices",
        "description": "Returns all registered devices for the authenticated user.\nDevices are sorted by last seen time (most recent first).\nIncludes device metadata such as name, type, fingerprint, and trust status.\nRequires authentication.",
        "operationId": "userListDevices",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Devices listed successfully. Returns array of device objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserDevice"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/devices/{device_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Delete a user device",
        "description": "Removes a registered device from the authenticated user's trusted devices.\nRequires authentication.\n\nEffects:\n- Device is permanently removed\n- Device can no longer be used for 2FA bypass\n- Device will need to be re-registered and verified if needed\n\nReturns success message on completion.",
        "operationId": "userDeleteDevice",
        "parameters": [
          {
            "name": "device_id",
            "in": "path",
            "description": "Device ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Device not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/logs": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List security logs",
        "description": "Returns a paginated list of security events for the authenticated user.\nEntries are sorted by creation date (newest first).\nIncludes event types, descriptions, IP addresses, and user agents.\nUseful for auditing account activity and detecting suspicious behavior.\nRequires authentication.",
        "operationId": "userListSecurityLogs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of log entries to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of log entries to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Security logs listed successfully. Returns array of security event entries with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserSecurityLog"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/oauth": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List OAuth accounts",
        "description": "Returns all linked OAuth/third-party login accounts for the authenticated user.\nAccounts are sorted by link date (most recent first).\nIncludes provider information, usernames, and token expiry status.\nRequires authentication.",
        "operationId": "userListOAuthAccounts",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth accounts listed successfully. Returns array of linked OAuth accounts with provider details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserOAuthInfo"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/oauth/{oauth_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Unlink an OAuth account",
        "description": "Removes a linked OAuth/third-party login account from the authenticated user.\nRequires authentication.\n\nPreconditions:\n- User must have at least one remaining login method (password or another OAuth account)\n\nEffects:\n- OAuth account link is permanently removed\n- User can no longer log in with this OAuth provider unless re-linked\n\nReturns success message on completion.",
        "operationId": "userUnlinkOAuth",
        "parameters": [
          {
            "name": "oauth_id",
            "in": "path",
            "description": "OAuth account ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth account unlinked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Cannot unlink: this is the last login method (set a password first)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "OAuth account not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/sessions": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List user sessions",
        "description": "Returns a paginated list of all active and recently-expired sessions for the authenticated user.\nSessions are sorted by last activity (most recent first).\nIncludes session metadata such as IP address, user agent, and expiration time.\nRequires authentication.",
        "operationId": "userListSessions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of sessions to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of sessions to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sessions listed successfully. Returns array of session objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserSessionInfo"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/sessions/{session_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Revoke a user session",
        "description": "Immediately terminates a specific session belonging to the authenticated user.\nRequires authentication.\n\nEffects:\n- Session is marked as revoked\n- Session can no longer be used for authentication\n- Active connections using this session are disconnected\n\nReturns success message on completion.",
        "operationId": "userRevokeSession",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session revoked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found or already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/tokens": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "List personal access tokens",
        "description": "Returns a paginated list of all personal access tokens (PATs) for the authenticated user.\nTokens are sorted by creation date (newest first).\nIncludes token names, scopes, last used timestamps, and expiry status.\nNote: Token values are never returned after creation for security reasons.\nRequires authentication.",
        "operationId": "userListTokens",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of tokens to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of tokens to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Personal access tokens listed successfully. Returns array of token metadata objects (token values are never exposed).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_UserPersonalAccessTokenInfo"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Create a personal access token",
        "description": "Creates a new personal access token (PAT) for the authenticated user.\nThe full token value is returned in the response — this is the ONLY time it will be shown.\nStore it securely; it cannot be retrieved again.\nRequires authentication.",
        "operationId": "userCreateToken",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Display name for the token (e.g., \"My CLI Token\")",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scopes",
            "in": "path",
            "description": "List of permission scopes assigned to the token",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/Scope"
              }
            }
          },
          {
            "name": "expires_at",
            "in": "path",
            "description": "Optional expiration date (UTC). If not set, the token never expires.",
            "required": true,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTokenBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Personal access token created successfully. The raw token value is included in the response and will never be shown again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreatePersonalAccessTokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request body (e.g., missing name or scopes)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/user/security/tokens/{token_id}": {
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Revoke a personal access token",
        "description": "Immediately revokes a personal access token belonging to the authenticated user.\nRequires authentication.\n\nEffects:\n- Token is marked as revoked and can no longer be used\n- All API calls using this token will fail with 401 Unauthorized\n- Revoked tokens remain visible in token list for audit purposes\n\nReturns success message on completion.",
        "operationId": "userRevokeToken",
        "parameters": [
          {
            "name": "token_id",
            "in": "path",
            "description": "Token ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Personal access token revoked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Token not found or already revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List accessible workspaces",
        "description": "Return workspaces owned by, joined by, or publicly accessible to the current user.",
        "operationId": "workspaceList",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of workspaces.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create a workspace",
        "description": "Create a new workspace. The creator automatically becomes the owner.",
        "operationId": "workspaceCreate",
        "requestBody": {
          "description": "Workspace creation parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Workspace created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDetail"
                }
              }
            }
          },
          "400": {
            "description": "Name is required or visibility is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/invitations/accept": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Accept an invitation",
        "description": "Accept a workspace invitation using the token from the invitation email. The authenticated user's verified email must match the invited email.",
        "operationId": "workspaceAcceptInvitation",
        "requestBody": {
          "description": "Invitation token.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invitation accepted and user added as a member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceInvitation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired invitation, or already a member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or email mismatch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get a workspace",
        "description": "Return the workspace identified by name, subject to visibility checks.",
        "operationId": "workspaceGet",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDetail"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or not accessible.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update a workspace",
        "description": "Update workspace name, description, visibility, or default role. Requires admin role.",
        "operationId": "workspaceUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Workspace update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Workspace updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDetail"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — invalid visibility or default_role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete a workspace",
        "description": "Soft-delete a workspace. Requires owner role.",
        "operationId": "workspaceDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/approvals": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List pending approvals",
        "description": "Return pending approval requests for the workspace. Requires admin role.",
        "operationId": "workspaceListApprovals",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of pending approvals.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspacePendingApproval"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Request an approval",
        "description": "Submit a request for workspace admin approval. Readable by anyone with workspace access.",
        "operationId": "workspaceRequestApproval",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Approval request type and optional reason.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestApprovalParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Approval request created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspacePendingApproval"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/approvals/{approval_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetApproval",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approval_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Approval retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspacePendingApproval"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Approval not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Review an approval request",
        "description": "Approve or reject a pending approval request. Requires owner role.",
        "operationId": "workspaceReviewApproval",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "approval_id",
            "in": "path",
            "description": "Approval record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Whether to approve or reject.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewApprovalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Approval reviewed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Approval not found or already reviewed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/archive": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Archive a workspace",
        "description": "Archive a workspace. Requires owner role. All repos become read-only.",
        "operationId": "workspaceArchive",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace archived.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or already archived.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/audit-logs": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get audit logs",
        "description": "Return recent audit log entries for the workspace. Requires admin role.",
        "operationId": "workspaceAuditLogs",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of audit log entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceAuditLog"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/avatar": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Upload workspace avatar",
        "description": "Upload an avatar image for a workspace. Requires admin role. Maximum size 5 MB. Supported: png, jpg, gif, webp. Accepts multipart/form-data with a single 'avatar' field.",
        "operationId": "workspaceUploadAvatar",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Avatar image file in a multipart form field named 'avatar'.",
          "content": {
            "multipart/form-data": {}
          }
        },
        "responses": {
          "200": {
            "description": "Avatar uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Workspace"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported image format or file too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Storage or database failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/billing": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get billing information",
        "description": "Return billing information for a workspace. Requires owner role.",
        "operationId": "workspaceGetBilling",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Billing information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceBilling"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update billing information",
        "description": "Update billing plan, email, or seat count. Requires owner role.",
        "operationId": "workspaceUpdateBilling",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Billing update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBillingParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Billing updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceBilling"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/billing/history": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List billing history",
        "description": "Return billing history for a workspace. Requires owner role.",
        "operationId": "workspaceBillingHistory",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of billing history entries (currently empty).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListResponse_Value"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/branding": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get custom branding",
        "description": "Return custom branding settings for a workspace. Requires admin role.",
        "operationId": "workspaceGetBranding",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branding settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceCustomBranding"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update custom branding",
        "description": "Update workspace custom branding including logo, favicon, colors, CSS, and support URL. Requires admin role.",
        "operationId": "workspaceUpdateBranding",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Branding update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBrandingParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Branding updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceCustomBranding"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/domains": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List domains",
        "description": "Return domains associated with the workspace. Requires admin role.",
        "operationId": "workspaceListDomains",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceDomain"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Add a domain",
        "description": "Add a domain for verification. The first domain added is auto-set as primary. Requires admin role.",
        "operationId": "workspaceAddDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Domain name to add.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDomainParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Domain added (unverified).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDomain"
                }
              }
            }
          },
          "400": {
            "description": "Domain is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/domains/{domain_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDomain"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update a domain",
        "description": "Update a domain name. Requires admin role.",
        "operationId": "workspaceUpdateDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "description": "Domain record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Updated domain name.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDomainParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Domain updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDomain"
                }
              }
            }
          },
          "400": {
            "description": "Domain is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete a domain",
        "description": "Remove a domain from the workspace. Cannot delete the primary domain. Requires admin role.",
        "operationId": "workspaceDeleteDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "description": "Domain record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Cannot delete primary domain.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/domains/{domain_id}/primary": {
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Set primary domain",
        "description": "Set a verified domain as the primary domain for the workspace. Requires owner role.",
        "operationId": "workspaceSetPrimaryDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "description": "Domain record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Primary domain set.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Domain must be verified first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/domains/{domain_id}/verify": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Verify a domain",
        "description": "Mark a domain as verified. Requires admin role.",
        "operationId": "workspaceVerifyDomain",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "domain_id",
            "in": "path",
            "description": "Domain record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Domain verified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Domain not found or already verified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/integrations": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List integrations",
        "description": "Return integrations configured for the workspace. Requires admin role.",
        "operationId": "workspaceListIntegrations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of integrations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create an integration",
        "description": "Add a third-party integration to the workspace. Requires admin role.",
        "operationId": "workspaceCreateIntegration",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Integration provider, name, config, and optional secret.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIntegrationParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Integration created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceIntegration"
                }
              }
            }
          },
          "400": {
            "description": "Invalid provider or name is empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/integrations/{integration_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetIntegration",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Integration retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update an integration",
        "description": "Update an integration's name, config, secret, or enabled state. Requires admin role.",
        "operationId": "workspaceUpdateIntegration",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "description": "Integration ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Integration update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIntegrationParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Integration updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceIntegration"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete an integration",
        "description": "Remove an integration from the workspace. Requires admin role.",
        "operationId": "workspaceDeleteIntegration",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "description": "Integration ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Integration deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Integration not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/invitations": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List pending invitations",
        "description": "Return pending (un-expired, un-revoked, un-accepted) invitations for a workspace. Requires admin role.",
        "operationId": "workspaceListInvitations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of invitations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceInvitation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create an invitation",
        "description": "Invite a user by email to join the workspace. An invitation email is sent. Requires admin role.",
        "operationId": "workspaceCreateInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Email and optional role.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invitation created and email sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateInvitationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Email is empty, role is invalid, or invitation already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database or email service failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/invitations/{invitation_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceInvitation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Revoke an invitation",
        "description": "Revoke a pending invitation so it can no longer be accepted. Requires admin role.",
        "operationId": "workspaceRevokeInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invitation_id",
            "in": "path",
            "description": "Invitation ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found or already used.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List issues in a workspace",
        "description": "Returns a paginated list of issues in the workspace, sorted by issue number (newest first).\nSupports filtering by state, priority, author, assignee, milestone, and label.\nOnly returns issues visible to the authenticated user (public + workspace member access).\nRequires authentication.",
        "operationId": "issueList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filter by issue state (\"open\" or \"closed\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "priority",
            "in": "query",
            "description": "Filter by priority level",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "author_id",
            "in": "query",
            "description": "Filter by author user ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "assignee_id",
            "in": "query",
            "description": "Filter by assignee user ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "milestone_id",
            "in": "query",
            "description": "Filter by milestone ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "label_id",
            "in": "query",
            "description": "Filter by label ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of issues to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of issues to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issues listed successfully. Returns filtered array of issue objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Create an issue",
        "description": "Creates a new issue in the specified workspace.\nRequires at least Member role in the workspace.\n\nParameters:\n- title: Issue title (required)\n- body: Issue body in markdown (optional)\n- priority: Priority level (optional, defaults to \"none\")\n- visibility: Visibility setting (optional, defaults to \"public\")\n- due_at: Due date (optional)\n- repo_ids: Related repository IDs\n- label_ids: Label IDs to apply\n- assignee_ids: User IDs to assign\n- milestone_id: Milestone ID to attach\n\nEffects:\n- Issue is created with auto-incrementing number\n- Author is automatically subscribed\n- Relations, labels, and assignees are attached\n- Workspace stats are updated\n\nReturns the created issue with full metadata.",
        "operationId": "issueCreate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Issue creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIssueParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Issue created successfully. Returns the newly created issue with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty title, invalid repository/label/milestone references",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or referenced resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "Get an issue by number",
        "description": "Returns detailed information about a specific issue, identified by workspace name and issue number.\nRequires read access to the issue (public or workspace member).",
        "operationId": "issueGet",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issue retrieved successfully. Returns complete issue with all metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Update an issue",
        "description": "Updates an existing issue's metadata such as title, body, priority, visibility, due date, and milestone.\nRequires write access to the issue (author or workspace member).\n\nAll fields are optional; only provided fields are updated.\nReturns the updated issue with full metadata.",
        "operationId": "issueUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Issue update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateIssueParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Issue updated successfully. Returns the updated issue with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Issue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid priority, visibility, or milestone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace, issue, or referenced resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Delete an issue",
        "description": "Soft-deletes an issue. The issue is marked as deleted but remains in the database.\nRequires Admin role in the workspace (or issue author).\n\nEffects:\n- Issue is marked as deleted (soft-delete)\n- Workspace issue count is decremented\n\nReturns success message on completion.",
        "operationId": "issueDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issue deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or issue author)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/assignees": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List assignees of an issue",
        "description": "Returns a paginated list of all users assigned to the given issue.\nShows who is assigned, when they were assigned, and who assigned them.\nRequires read access to the issue.",
        "operationId": "issueListAssignees",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of assignees to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of assignees to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Assignees listed successfully. Returns array of assignee objects with assignment metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueAssignee"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/assignees/{user_id}": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Assign a user to an issue",
        "description": "Assigns a workspace member to the given issue.\nRequires write access to the issue (author or workspace member).\n\nEffects:\n- User is assigned to the issue\n- Assignee is automatically subscribed to the issue\n- Issue assignee count is incremented\n\nReturns the created assignment record.",
        "operationId": "issueAssign",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID (UUID) to assign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "User assigned successfully. Returns the created assignment record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueAssignee"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue or user not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already assigned to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Unassign a user from an issue",
        "description": "Removes a user from the issue's assignee list.\nRequires write access to the issue (author or workspace member).\n\nEffects:\n- User is removed from the issue's assignees\n- Issue assignee count is decremented\n\nReturns success message on completion.",
        "operationId": "issueUnassign",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID (UUID) to unassign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User unassigned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "User is not assigned to this issue or not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/close": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Close an issue",
        "description": "Closes an open issue. The issue is marked as closed and the closing user is recorded.\nRequires write access to the issue (author or workspace member).\n\nEffects:\n- Issue state changes to \"closed\"\n- Closed by and closed at are recorded\n- A \"Closed\" event is logged\n\nReturns the closed issue with updated metadata.",
        "operationId": "issueClose",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issue closed successfully. Returns the closed issue with updated metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Issue"
                }
              }
            }
          },
          "400": {
            "description": "Issue is already closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to close this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/comments": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List issue comments",
        "description": "Returns a paginated list of comments on an issue, sorted by creation date (oldest first).\nRequires read access to the issue.",
        "operationId": "issueListComments",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comments listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueCommentDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Create a comment on an issue",
        "description": "Adds a new comment to an issue. Users with read access can comment unless the issue is locked\n(in which case only users with write access can comment).\n\nParameters:\n- body: Comment body in markdown format (required)\n- reply_to_comment_id: ID of parent comment for threaded replies (optional)\n\nEffects:\n- Comment is created and attached to the issue\n- Commenter is automatically subscribed to the issue\n- Issue comment count is incremented\n\nReturns the created comment with metadata.",
        "operationId": "issueCreateComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Comment creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommentParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Comment created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueCommentDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty body or issue is locked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (issue locked and user lacks write access)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/comments/{comment_id}": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Update an issue comment",
        "description": "Updates the body of an existing comment. Only the comment author can update their own comments.\nRequires read access to the issue.\n\nReturns the updated comment with edit timestamp.",
        "operationId": "issueUpdateComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Comment update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommentParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Comment updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueComment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot edit other users' comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace, issue, or comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Delete an issue comment",
        "description": "Soft-deletes a comment. The comment author can delete their own comments.\nWorkspace admins can delete any comment.\n\nEffects:\n- Comment is marked as deleted\n- Issue comment count is decremented\n\nReturns success message on completion.",
        "operationId": "issueDeleteComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comment deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot delete other users' comments (requires admin)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace, issue, or comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/events": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List issue events",
        "description": "Returns a chronological timeline of all events for the given issue.\nEvents include creation, updates, state changes, assignments, label changes, etc.\nSorted by creation date (oldest first for timeline display).\nRequires read access to the issue.",
        "operationId": "issueListEvents",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of events to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of events to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events listed successfully. Returns chronological array of event objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueEvent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/labels": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List labels assigned to an issue",
        "description": "Returns a paginated list of all label relations for the given issue.\nShows which labels are attached to the issue, with assignment metadata.\nRequires read access to the issue.",
        "operationId": "issueListLabelRelations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of label relations to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of label relations to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label relations listed successfully. Returns array of label relation objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueLabelRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/labels/{label_id}": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Assign a label to an issue",
        "description": "Attaches a label to the given issue. The label must belong to a repository in the same workspace.\nRequires write access to the issue (author or workspace member).\n\nEffects:\n- Label is attached to the issue\n- Issue label count is incremented\n\nReturns the created label relation.",
        "operationId": "issueAssignLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID) to assign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label assigned successfully. Returns the created label relation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueLabelRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue or label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Label is already assigned to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Unassign a label from an issue",
        "description": "Removes a label from the given issue.\nRequires write access to the issue (author or workspace member).\n\nEffects:\n- Label relation is removed from the issue\n- Issue label count is decremented\n\nReturns success message on completion.",
        "operationId": "issueUnassignLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID) to unassign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label unassigned successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Label is not assigned to this issue or not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/lock": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Lock or unlock an issue",
        "description": "Locks or unlocks conversation on an issue. When locked, only users with write access can comment.\nRequires write access to the issue (author or workspace member).\n\nReturns the updated issue with lock status.",
        "operationId": "issueLock",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Lock/unlock parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockIssueParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Issue lock status updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Issue"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to manage this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/mute": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Mute or unmute issue notifications",
        "description": "Mutes or unmutes notifications for the given issue without unsubscribing.\nRequires an active subscription to the issue.\n\nReturns success message on completion.",
        "operationId": "issueMute",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Mute/unmute parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MuteIssueParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Mute status updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not currently subscribed to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/prs": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List pull request relations for an issue",
        "description": "Returns a paginated list of all pull requests linked to the given issue.\nShows relation type (closes, references, depends_on, etc.) and link metadata.\nRequires read access to the issue.",
        "operationId": "issueListPrRelations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of relations to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of relations to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR relations listed successfully. Returns array of PR relation objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssuePrRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Link a pull request to an issue",
        "description": "Creates a relation between the given issue and a pull request.\nCommonly used to mark a PR as closing or referencing an issue.\nRequires write access to the issue.\n\nParameters:\n- pull_request_id: Pull request ID (UUID) to link\n- relation_type: Relation type (\"closes\", \"references\", \"depends_on\", default: \"references\")\n\nReturns the created relation.",
        "operationId": "issueLinkPr",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Link pull request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkPrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Pull request linked successfully. Returns the created relation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssuePrRelation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid relation type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue or pull request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Pull request is already linked to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/prs/{relation_id}": {
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Unlink a pull request from an issue",
        "description": "Removes a pull request relation from the given issue.\nRequires write access to the issue.\n\nReturns success message on completion.",
        "operationId": "issueUnlinkPr",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "relation_id",
            "in": "path",
            "description": "Relation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pull request unlinked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR relation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/reactions": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List reactions on an issue",
        "description": "Returns a paginated list of all emoji reactions on the given issue.\nIncludes reaction content, target type, and user who added each reaction.\nRequires read access to the issue.",
        "operationId": "issueListReactions",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of reactions to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of reactions to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions listed successfully. Returns array of reaction objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueReaction"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Add a reaction to an issue",
        "description": "Adds an emoji reaction to the given issue.\nRequires read access to the issue.\n\nParameters:\n- content: Reaction content (e.g., \"👍\", \"❤️\", \"🎉\")\n- target_type: Target type for the reaction (defaults to \"Issue\")\n- target_id: Target ID for reactions on specific comments (optional)\n\nReturns the created reaction.",
        "operationId": "issueAddReaction",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Reaction creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIssueReactionParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Reaction added successfully. Returns the created reaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueReaction"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty content or invalid target type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/reactions/{reaction_id}": {
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Remove a reaction from an issue",
        "description": "Removes a previously added reaction. Only the user who added the reaction can remove it.\nRequires read access to the issue.\n\nReturns success message on completion.",
        "operationId": "issueRemoveReaction",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "reaction_id",
            "in": "path",
            "description": "Reaction ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reaction removed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot remove another user's reaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/reopen": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Reopen an issue",
        "description": "Reopens a closed issue. The issue state changes back to \"open\" and closed metadata is cleared.\nRequires write access to the issue (author or workspace member).\n\nReturns the reopened issue with updated metadata.",
        "operationId": "issueReopen",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Issue reopened successfully. Returns the reopened issue with updated metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Issue"
                }
              }
            }
          },
          "400": {
            "description": "Issue is not closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to reopen this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/repos": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List repository relations for an issue",
        "description": "Returns a paginated list of all repositories linked to the given issue.\nShows relation type (references, duplicates, blocks, etc.) and link metadata.\nRequires read access to the issue.",
        "operationId": "issueListRepoRelations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of relations to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of relations to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository relations listed successfully. Returns array of relation objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueRepoRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Link a repository to an issue",
        "description": "Creates a relation between the given issue and a repository.\nRequires write access to the issue.\n\nParameters:\n- repo_id: Repository ID (UUID) to link\n- relation_type: Relation type (\"references\", \"duplicates\", \"blocks\", \"depends_on\", default: \"references\")\n\nReturns the created relation.",
        "operationId": "issueLinkRepo",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Link repository parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkRepoParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Repository linked successfully. Returns the created relation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueRepoRelation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid relation type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue or repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Repository is already linked to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/repos/{relation_id}": {
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Unlink a repository from an issue",
        "description": "Removes a repository relation from the given issue.\nRequires write access to the issue.\n\nReturns success message on completion.",
        "operationId": "issueUnlinkRepo",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "relation_id",
            "in": "path",
            "description": "Relation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository unlinked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository relation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/subscribe": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Subscribe to an issue",
        "description": "Subscribes the authenticated user to the given issue to receive notifications.\nRequires read access to the issue.\n\nEffects:\n- User is added as a subscriber with \"manual\" reason\n- User receives notifications for all issue activity\n\nReturns the created subscription record.",
        "operationId": "issueSubscribe",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscribed successfully. Returns the subscription record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueSubscriber"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already subscribed to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Unsubscribe from an issue",
        "description": "Removes the authenticated user's subscription to the given issue.\nStops all notifications for this issue.\n\nReturns success message on completion.",
        "operationId": "issueUnsubscribe",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsubscribed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not currently subscribed to this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/subscribers": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List subscribers of an issue",
        "description": "Returns a paginated list of all users subscribed to the given issue.\nShows who receives notifications and their subscription reason (author, assignee, manual).\nRequires read access to the issue.",
        "operationId": "issueListSubscribers",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of subscribers to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of subscribers to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscribers listed successfully. Returns array of subscriber objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueSubscriber"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to view this issue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/issues/{number}/transfer": {
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Transfer an issue to another workspace",
        "description": "Moves an issue from the current workspace to a different workspace.\nRequires Admin role in both the source and target workspaces.\n\nEffects:\n- Issue is transferred to the target workspace with a new number\n- Source workspace issue count is decremented\n- Target workspace issue count is incremented\n\nReturns the transferred issue with updated workspace and number.",
        "operationId": "issueTransfer",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "Issue number (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Transfer parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferIssueParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Issue transferred successfully. Returns the issue with new workspace assignment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Issue"
                }
              }
            }
          },
          "400": {
            "description": "Invalid target workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions in source or target workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace or issue not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/leave": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Leave a workspace",
        "description": "Remove the current user from the workspace. The owner cannot leave; transfer ownership first.",
        "operationId": "workspaceLeave",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Left the workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Owner cannot leave.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or not a member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/members": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List workspace members",
        "description": "Return active members of a workspace. Viewable by anyone with read access.",
        "operationId": "workspaceListMembers",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of members.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceMember"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or not readable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Add a member",
        "description": "Add a user to a workspace. Requires admin role. Cannot add members with role equal to or higher than the caller.",
        "operationId": "workspaceAddMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "User ID and optional role.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddMemberParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Member added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceMember"
                }
              }
            }
          },
          "400": {
            "description": "Cannot add owner, invalid role, or member invites disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already a member.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/members/{member_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceMember"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Remove a member",
        "description": "Remove a member from the workspace. Requires admin role. Cannot remove owner.",
        "operationId": "workspaceRemoveMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Member record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Cannot remove owner or member with equal/higher role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/members/{member_id}/role": {
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update a member's role",
        "description": "Change the role of a workspace member. Requires admin role. Cannot change owner role; use transfer-owner instead.",
        "operationId": "workspaceUpdateMemberRole",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Member record ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "New role value.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMemberRoleParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Member role updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid role, cannot change owner, or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Member not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List repositories in a workspace",
        "description": "Returns a paginated list of repositories that the current user has access to within the specified workspace.\nAccess is determined by:\n- Public repositories: accessible to all authenticated users\n- Private repositories: accessible only to repository members and workspace owners\n- Internal repositories: accessible to all workspace members\n\nThe results are sorted by creation date in descending order (newest first).",
        "operationId": "repoList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of repositories to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of repositories to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repositories listed successfully. Returns an array of repository objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a new repository",
        "description": "Creates a new Git repository within the specified workspace. The authenticated user becomes the repository owner.\n\nRequirements:\n- User must have at least Member role in the workspace\n- Repository name must be unique within the workspace\n- Name must be 1-100 characters, alphanumeric, hyphens, underscores, and dots allowed\n\nOptional parameters:\n- description: Repository description (max 500 characters)\n- visibility: \"public\", \"private\", or \"internal\" (defaults to workspace setting)\n- default_branch: Default branch name (defaults to \"main\")\n\nReturns the created repository with full metadata.",
        "operationId": "repoCreate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Repository creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRepoParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Repository created successfully. Returns the newly created repository with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: name too long, invalid characters, or invalid visibility",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to create repositories in this workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Repository with this name already exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git initialization failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "Get a specific repository",
        "description": "Returns detailed information about a specific repository identified by workspace and repository name.\nAccess is determined by repository visibility:\n- Public repositories: accessible to all authenticated users\n- Private repositories: accessible only to repository members and workspace owners\n- Internal repositories: accessible to all workspace members\n\nReturns 404 if the repository doesn't exist or the user lacks access permissions.",
        "operationId": "repoGet",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository retrieved successfully. Returns complete repository metadata including visibility, default branch, creation date, and statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository not found or access denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Repos"
        ],
        "summary": "Update a repository",
        "description": "Updates repository metadata such as name, description, visibility, and default branch.\nRequires Admin role or higher in the repository.\n\nUpdate rules:\n- name: Must be unique within workspace if changed (1-100 characters)\n- description: Max 500 characters\n- visibility: \"public\", \"private\", or \"internal\" (workspace owners can restrict public repos)\n- default_branch: Must be an existing branch name\n\nAll fields are optional; only provided fields are updated.\nReturns the updated repository with full metadata.",
        "operationId": "repoUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Repository update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRepoParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Repository updated successfully. Returns the updated repository with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: name too long, invalid characters, default branch doesn't exist, or public repos disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Repository name already exists in the workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Delete a repository",
        "description": "Permanently deletes a repository and all associated data including:\n- Git repository and all commits\n- Branches, tags, and releases\n- Issues, pull requests, and comments\n- Webhooks, deploy keys, and protection rules\n- Stars, watches, and forks\n\nRequires Owner role in the repository. This action is irreversible.\n\nReturns success message on completion.",
        "operationId": "repoDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository deleted successfully. All repository data has been permanently removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Owner role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git deletion failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/archive": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Archive a repository",
        "description": "Marks a repository as archived, making it read-only. All write operations (push, create issues, etc.) are disabled.\nRequires Owner role in the repository.\n\nEffects:\n- Repository status changes to \"archived\"\n- All write operations are blocked\n- Repository remains visible based on its visibility setting\n- Can be unarchived later by repository owners\n\nReturns success message on completion.",
        "operationId": "repoArchive",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository archived successfully. Repository is now read-only.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Owner role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Repository is already archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoListBranches",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branches listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListBranchesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoCreateBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBranchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Branch created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Branch"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Branch"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoDeleteBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Cannot delete default branch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}/default": {
      "put": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoSetDefaultBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default branch set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{branch_name}/protection": {
      "put": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoSetBranchProtection",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetBranchProtectionParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Branch protection set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/branches/{target_branch}/merge-check": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "Check if a branch meets merge requirements",
        "operationId": "check_branch_merge",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_branch",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pr_number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Merge check completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BranchMergeCheck"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or pull request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/comments": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a commit comment",
        "description": "Creates a new comment on a specific commit. Comments can be general or inline (attached to a specific file and line).\nRequires Write role or higher in the repository.\n\nParameters:\n- commit_sha: Commit SHA to comment on (must exist in repository)\n- body: Comment body in markdown format (1-10000 characters)\n- path: File path for inline comments (optional)\n- line: Line number for inline comments (optional, requires path)\n\nEffects:\n- Comment is attached to the commit\n- Comment author receives notifications for replies\n- Inline comments appear in code review interfaces\n\nReturns the created comment with metadata including ID and timestamps.",
        "operationId": "repoCreateCommitComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Commit comment creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommitCommentParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Commit comment created successfully. Returns the newly created comment with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoCommitComment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: body too long, line without path, or commit doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, commit, or file path not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/comments/{comment_id}/resolve": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Resolve a commit comment",
        "description": "Marks a commit comment as resolved, indicating the issue has been addressed.\nRequires Write role or higher in the repository.\n\nEffects:\n- Comment is marked as resolved\n- Resolved comments are visually distinguished in code review interfaces\n- Resolution is recorded with the resolver's user ID and timestamp\n\nReturns success message on completion.",
        "operationId": "repoResolveCommitComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "description": "Comment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit comment resolved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Comment is already resolved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commit-comments/{comment_id}": {
      "put": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoUpdateCommitComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Commit comment update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCommitCommentParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Commit comment updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoCommitComment"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Commit comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{commit_sha}/comments": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List commit comments",
        "description": "Returns a paginated list of all comments on a specific commit, sorted by creation date (newest first).\nIncludes comment metadata such as:\n- Comment body in markdown format\n- Author information\n- File path and line number (for inline comments)\n- Resolved status\n- Creation and update timestamps\n\nRequires read access to the repository.",
        "operationId": "repoListCommitComments",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "push_commit_id",
            "in": "path",
            "description": "Push commit ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of comments to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of comments to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit comments listed successfully. Returns an array of comment objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoCommitComment"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or commit not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{commit_sha}/statuses": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List commit statuses",
        "description": "Returns a paginated list of all status checks for a specific commit, sorted by creation date (newest first).\nIncludes status metadata such as:\n- Status state (pending, success, failure, error)\n- Context name (e.g., \"ci/build\", \"ci/test\")\n- Description and target URL\n- Creator information\n\nRequires read access to the repository.",
        "operationId": "repoListCommitStatuses",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "push_commit_id",
            "in": "path",
            "description": "Push commit ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of statuses to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of statuses to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit statuses listed successfully. Returns an array of status objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoCommitStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or commit not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/commits/{push_commit_id}/statuses/{status_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetCommitStatus",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "push_commit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "status_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit status retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoCommitStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Commit status not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List deploy keys in a repository",
        "description": "Returns a paginated list of all deploy keys in the repository, sorted by creation date (newest first).\nIncludes deploy key metadata such as:\n- Key title and fingerprint\n- Read-only status\n- Creator information\n- Creation date and last used date\n\nRequires Admin role or higher in the repository.",
        "operationId": "repoListDeployKeys",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of deploy keys to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of deploy keys to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deploy keys listed successfully. Returns an array of deploy key objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoDeployKey"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Add a deploy key to a repository",
        "description": "Adds an SSH public key for automated deployments and CI/CD access to the repository.\nRequires Admin role or higher in the repository.\n\nParameters:\n- title: Human-readable name for the deploy key (1-100 characters)\n- key: SSH public key in OpenSSH format (e.g., \"ssh-rsa AAAA...\")\n- read_only: Whether the key has read-only access (default: true)\n\nEffects:\n- Deploy key is added to the repository\n- Key can be used for Git operations (clone, fetch, push if not read-only)\n- Key fingerprint is calculated and stored\n\nReturns the created deploy key with metadata including fingerprint.",
        "operationId": "repoAddDeployKey",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Deploy key addition parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddDeployKeyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Deploy key added successfully. Returns the newly created deploy key with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDeployKey"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: title too long or invalid SSH key format",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Deploy key with this fingerprint already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/deploy-keys/{key_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetDeployKey",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deploy key retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDeployKey"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Deploy key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Delete a deploy key from a repository",
        "description": "Removes an SSH deploy key from the repository, revoking its access.\nRequires Admin role or higher in the repository.\n\nEffects:\n- Deploy key is permanently removed from the repository\n- Key can no longer be used for Git operations\n- Automated systems using this key will lose access\n\nReturns success message on completion.",
        "operationId": "repoDeleteDeployKey",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "description": "Deploy key ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deploy key deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or deploy key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/fork": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Fork a repository",
        "description": "Creates a copy of the repository in the specified workspace or the current user's workspace.\nRequires read access to the source repository and write access to the target workspace.\n\nEffects:\n- Creates a new repository with all branches, tags, and commit history\n- Establishes a parent-child relationship between source and fork\n- Fork is initially set to private visibility\n- Current user becomes the owner of the fork\n\nReturns the created fork repository with full metadata.",
        "operationId": "repoFork",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Fork parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForkRepoParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Repository forked successfully. Returns the newly created fork with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: target name conflicts or invalid characters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to fork or create in target workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Source repository or target workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Fork with this name already exists in target workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git operation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoDeleteFork",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fork deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Fork not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/forks": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List forks of a repository",
        "description": "Returns a paginated list of all repositories that have been forked from this repository.\nIncludes fork metadata such as:\n- Fork repository information\n- Fork owner and workspace\n- Fork creation date\n\nRequires read access to the repository.",
        "operationId": "repoListForks",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of forks to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of forks to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Forks listed successfully. Returns an array of fork objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoFork"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/blame": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Blame a file",
        "operationId": "gitBlame",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blame retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BlameResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/blobs": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get blob content",
        "operationId": "gitGetBlob",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Blob retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Blob"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Blob not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/branches": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "List branches",
        "operationId": "gitListBranches",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branches listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListBranchesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Create a branch",
        "operationId": "gitCreateBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Branch creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBranchBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Branch created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Branch"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/branches/{branch_name}": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get a branch",
        "operationId": "gitGetBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Branch"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Branch not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Git"
        ],
        "summary": "Delete a branch",
        "operationId": "gitDeleteBranch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/cherry-pick": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Cherry-pick a commit",
        "operationId": "gitCherryPick",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Cherry-pick parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CherryPickParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Cherry-pick completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateCommitResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Cherry-pick conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/commits": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "List commits",
        "operationId": "gitListCommits",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commits listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListCommitsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Create a commit",
        "operationId": "gitCreateCommit",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Commit creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommitParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Commit created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateCommitResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/commits/{revision}": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get a single commit",
        "operationId": "gitGetCommit",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commit retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Commit"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Commit not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/compare": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Compare two commits",
        "operationId": "gitCompare",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CompareCommitsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/conflicts": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "List merge conflicts",
        "operationId": "gitListConflicts",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conflicts listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListMergeConflictsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/diff": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get diff between two revisions",
        "operationId": "gitDiff",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Diff retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_GetDiffResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/diff-stats": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get diff statistics between two revisions",
        "operationId": "gitDiffStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Diff stats retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_DiffStats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/exists": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Check if repository exists",
        "operationId": "gitRepoExists",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository existence check completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_bool"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/garbage-collect": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Run garbage collection",
        "operationId": "gitGarbageCollect",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Garbage collection completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepositoryMaintenanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/health": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Check repository health",
        "operationId": "gitRepoHealth",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository health check completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepositoryHealthResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/info": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get repository info",
        "operationId": "gitRepoInfo",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository info retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Repository"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/merge": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Merge branches",
        "operationId": "gitMerge",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Merge parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergeParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Merge completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MergeResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Merge conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/merge-check": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Check if a merge is possible",
        "operationId": "gitMergeCheck",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Merge check completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_MergeResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/rebase": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Rebase a branch",
        "operationId": "gitRebase",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Rebase parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RebaseParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Rebase completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RebaseResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Rebase conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/revert": {
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Revert a commit",
        "operationId": "gitRevert",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Revert parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevertParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Revert completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_CreateCommitResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/stats": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "Get repository statistics",
        "operationId": "gitRepoStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository statistics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepositoryStatistics"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/tags": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "List tags",
        "operationId": "gitListTags",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pattern",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tags listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListTagsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Git"
        ],
        "summary": "Create a tag",
        "operationId": "gitCreateTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Tag creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTagBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Tag created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Tag"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/tags/{tag_name}": {
      "delete": {
        "tags": [
          "Git"
        ],
        "summary": "Delete a tag",
        "operationId": "gitDeleteTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/git/tree": {
      "get": {
        "tags": [
          "Git"
        ],
        "summary": "List tree contents",
        "operationId": "gitListTree",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "recursive",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tree listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListTreeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List repository invitations",
        "description": "Returns a paginated list of all pending invitations for the repository, sorted by creation date (newest first).\nIncludes invitation metadata such as:\n- Invitee email address\n- Invited role\n- Inviter information\n- Expiration date\n- Creation date\n\nRequires Admin role or higher in the repository.",
        "operationId": "repoListInvitations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of invitations to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of invitations to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitations listed successfully. Returns an array of invitation objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoInvitation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a repository invitation",
        "description": "Sends an invitation email to a user to join the repository with a specific role.\nRequires Admin role or higher in the repository.\n\nParameters:\n- email: Email address of the invitee (must be a valid email)\n- role: Role to assign when invitation is accepted (\"read\", \"write\", \"admin\")\n\nEffects:\n- Invitation email is sent to the invitee\n- Invitation expires after 7 days\n- Invitee must have a verified email to accept\n\nReturns the created invitation with metadata including expiration date.",
        "operationId": "repoCreateInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Invitation creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRepoInvitationParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Invitation created successfully. Returns the newly created invitation with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoInvitation"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid email format or invalid role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already a member or has a pending invitation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or email sending failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/invitations/{invitation_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invitation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoInvitation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Invitation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Revoke a repository invitation",
        "description": "Cancels a pending invitation, preventing the invitee from accepting it.\nRequires Admin role or higher in the repository.\n\nEffects:\n- Invitation is marked as revoked\n- Invitee can no longer accept the invitation\n- Invitation email link becomes invalid\n\nReturns success message on completion.",
        "operationId": "repoRevokeInvitation",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invitation_id",
            "in": "path",
            "description": "Invitation ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invitation revoked successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or invitation not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/labels": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List labels in a repository",
        "description": "Returns all issue labels defined in the repository, sorted alphabetically.\nRequires read access to the repository.",
        "operationId": "issueListLabels",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Labels listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueLabel"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Create a label",
        "description": "Creates a new issue label in a repository.\nRequires at least Member role in the repository.\n\nParameters:\n- name: Label name (required, e.g., \"bug\", \"feature\")\n- color: Hex color code (required, e.g., \"#FF0000\")\n- description: Label description (optional)\n\nReturns the created label with metadata.",
        "operationId": "issueCreateLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Label creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLabelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Label created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueLabel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty name or invalid color",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/labels/{label_id}": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Update a label",
        "description": "Updates an existing issue label's name, color, or description.\nRequires Admin role in the repository.\n\nAll fields are optional; only provided fields are updated.\nReturns the updated label.",
        "operationId": "issueUpdateLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Label update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLabelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Label updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueLabel"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Delete a label",
        "description": "Permanently removes an issue label from a repository.\nRequires Admin role in the repository.\n\nEffects:\n- Label is permanently deleted\n- All issue-label relations using this label are removed\n\nReturns success message on completion.",
        "operationId": "issueDeleteLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/milestones": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List milestones in a repository",
        "description": "Returns a paginated list of milestones in the repository, sorted by state (open first) then by due date.\nIncludes milestone metadata such as title, description, state, due date, and progress.\nRequires read access to the repository.",
        "operationId": "issueListMilestones",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of milestones to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of milestones to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Milestones listed successfully. Returns array of milestone objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueMilestone"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Create a milestone",
        "description": "Creates a new milestone in a repository for tracking issue progress.\nRequires at least Member role in the repository.\n\nParameters:\n- title: Milestone title (required)\n- description: Description of the milestone (optional)\n- due_at: Target due date (optional)\n\nReturns the created milestone with metadata.",
        "operationId": "issueCreateMilestone",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Milestone creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMilestoneParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Milestone created successfully. Returns the newly created milestone with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueMilestone"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty title",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/milestones/{milestone_id}": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Update a milestone",
        "description": "Updates an existing milestone's metadata. Can also close or reopen the milestone via the state field.\nRequires at least Member role in the repository.\n\nUpdatable fields:\n- title: Milestone title (optional)\n- description: Description (optional)\n- due_at: Target due date (optional)\n- state: State (\"open\" or \"closed\") for closing/reopening the milestone (optional)\n\nAll fields are optional; only provided fields are updated.\nReturns the updated milestone with full metadata.",
        "operationId": "issueUpdateMilestone",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "milestone_id",
            "in": "path",
            "description": "Milestone ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Milestone update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMilestoneParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Milestone updated successfully. Returns the updated milestone with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueMilestone"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or milestone not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Delete a milestone",
        "description": "Permanently removes a milestone from the repository.\nRequires Admin role in the repository.\n\nEffects:\n- Milestone is permanently deleted\n- Issues attached to this milestone lose their milestone association\n\nReturns success message on completion.",
        "operationId": "issueDeleteMilestone",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "milestone_id",
            "in": "path",
            "description": "Milestone ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Milestone deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or milestone not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/templates": {
      "get": {
        "tags": [
          "Issues"
        ],
        "summary": "List issue templates in a repository",
        "description": "Returns a paginated list of all active issue templates in the repository.\nTemplates provide pre-filled content for creating new issues.\nSorted alphabetically by name.\nRequires read access to the repository.",
        "operationId": "issueListTemplates",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of templates to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of templates to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Templates listed successfully. Returns array of template objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_IssueTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Issues"
        ],
        "summary": "Create an issue template",
        "description": "Creates a new issue template in the repository.\nRequires at least Member role in the repository.\n\nParameters:\n- name: Template name (required)\n- description: Template description (optional)\n- title_template: Default title for issues (optional, supports placeholders)\n- body_template: Default body content in markdown (required)\n- labels: List of label names to auto-apply (optional)\n\nReturns the created template with metadata.",
        "operationId": "issueCreateTemplate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Template creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Template created successfully. Returns the newly created template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueTemplate"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty name or body template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/issues/templates/{template_id}": {
      "put": {
        "tags": [
          "Issues"
        ],
        "summary": "Update an issue template",
        "description": "Updates an existing issue template's metadata and content.\nRequires Admin role in the repository.\n\nAll fields are optional; only provided fields are updated.\nReturns the updated template.",
        "operationId": "issueUpdateTemplate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "description": "Template ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Template update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTemplateParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Template updated successfully. Returns the updated template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_IssueTemplate"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Issues"
        ],
        "summary": "Delete an issue template",
        "description": "Permanently removes an issue template from the repository.\nRequires Admin role in the repository.\n\nReturns success message on completion.",
        "operationId": "issueDeleteTemplate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template_id",
            "in": "path",
            "description": "Template ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/leave": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Leave a repository",
        "description": "Removes the current user's access to the repository.\nRequires the user to be a member of the repository.\n\nRestrictions:\n- Repository owner cannot leave (use transfer_owner instead)\n\nEffects:\n- User loses all access to the repository\n- User is removed from all repository activities\n\nReturns success message on completion.",
        "operationId": "repoLeave",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Left repository successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Repository owner cannot leave the repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List repository members",
        "description": "Returns a paginated list of all members with access to the repository, sorted by join date (oldest first).\nIncludes member metadata such as:\n- User information (ID, username, display name)\n- Role (owner, admin, write, read)\n- Join date and last activity\n\nRequires read access to the repository.",
        "operationId": "repoListMembers",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of members to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of members to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Members listed successfully. Returns an array of member objects with user information and roles.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoMember"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Add a member to a repository",
        "description": "Grants a user access to the repository with a specific role.\nRequires Admin role or higher in the repository.\n\nRequirements:\n- User must exist in the system\n- User must be a member of the workspace\n- Role must be one of: \"read\", \"write\", \"admin\" (cannot assign \"owner\")\n\nReturns the created member record with user information and role.",
        "operationId": "repoAddMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Member addition parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddRepoMemberParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Member added successfully. Returns the newly created member record with user information and role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid role or user doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or user not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User is already a member of this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members/{member_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoMember"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Remove a member from a repository",
        "description": "Revokes a user's access to the repository.\nRequires Admin role or higher in the repository.\n\nRestrictions:\n- Cannot remove the repository owner (use transfer_owner instead)\n- Cannot remove members with equal or higher role than your own\n\nEffects:\n- Member loses all access to the repository\n- Member is removed from all repository activities\n\nReturns success message on completion.",
        "operationId": "repoRemoveMember",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Member ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member removed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Cannot remove the repository owner or member with higher role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/members/{member_id}/role": {
      "put": {
        "tags": [
          "Repos"
        ],
        "summary": "Update a member's role in a repository",
        "description": "Changes the access level of an existing repository member.\nRequires Admin role or higher in the repository.\n\nRole restrictions:\n- Cannot change the owner's role (use transfer_owner instead)\n- Cannot assign \"owner\" role (use transfer_owner instead)\n- Can only assign roles equal to or lower than your own\n- Valid roles: \"read\", \"write\", \"admin\"\n\nReturns the updated member record with new role information.",
        "operationId": "repoUpdateMemberRole",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Member ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Role update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRepoMemberRoleParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Member role updated successfully. Returns the updated member record with new role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoMember"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid role or attempting to change owner role",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or member not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List branch protection rules in a repository",
        "description": "Returns a paginated list of all branch protection rules in the repository, sorted by pattern alphabetically.\nIncludes protection rule metadata such as:\n- Branch name pattern (supports wildcards like \"feature/*\")\n- Required approvals count\n- Required status checks\n- Restrictions on pushes and deletions\n- Creator information\n\nRequires read access to the repository.",
        "operationId": "repoListProtectionRules",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of protection rules to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of protection rules to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Protection rules listed successfully. Returns an array of protection rule objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_BranchProtectionRule"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a branch protection rule",
        "description": "Creates a new branch protection rule that enforces policies on matching branches.\nRequires Admin role or higher in the repository.\n\nParameters:\n- pattern: Branch name pattern (supports wildcards like \"feature/*\", \"release/**\")\n- required_approvals: Number of required approvals before merging (0-10)\n- require_status_checks: Whether status checks must pass\n- required_status_checks: List of required status check contexts\n- restrict_pushes: Restrict who can push to matching branches\n- allow_force_pushes: Allow force pushes (only if restrict_pushes is false)\n- allow_deletions: Allow branch deletion (only if restrict_pushes is false)\n\nReturns the created protection rule with full configuration.",
        "operationId": "repoCreateProtectionRule",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Protection rule creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProtectionRuleParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Protection rule created successfully. Returns the newly created protection rule with full configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BranchProtectionRule"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid pattern, negative approvals count, or conflicting settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Protection rule with this pattern already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection-rules/{rule_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "Get a specific branch protection rule",
        "description": "Returns detailed information about a specific branch protection rule.\nRequires read access to the repository.\n\nReturns the complete protection rule with all configuration details including:\n- Branch name pattern\n- Required approvals and status checks\n- Push and deletion restrictions\n- Creator information and timestamps",
        "operationId": "repoGetProtectionRule",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rule_id",
            "in": "path",
            "description": "Protection rule ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Protection rule retrieved successfully. Returns complete protection rule with all configuration details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BranchProtectionRule"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or protection rule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Repos"
        ],
        "summary": "Update a branch protection rule",
        "description": "Updates an existing branch protection rule's configuration.\nRequires Admin role or higher in the repository.\n\nUpdatable fields:\n- required_approvals: Number of required approvals before merging (0-10)\n- require_status_checks: Whether status checks must pass\n- required_status_checks: List of required status check contexts\n- restrict_pushes: Restrict who can push to matching branches\n- allow_force_pushes: Allow force pushes (only if restrict_pushes is false)\n- allow_deletions: Allow branch deletion (only if restrict_pushes is false)\n\nAll fields are optional; only provided fields are updated.\nReturns the updated protection rule with full configuration.",
        "operationId": "repoUpdateProtectionRule",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rule_id",
            "in": "path",
            "description": "Protection rule ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Protection rule update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProtectionRuleParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Protection rule updated successfully. Returns the updated protection rule with full configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_BranchProtectionRule"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: negative approvals count or conflicting settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or protection rule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Delete a branch protection rule",
        "description": "Permanently removes a branch protection rule from the repository.\nRequires Admin role or higher in the repository.\n\nEffects:\n- Protection rule is permanently removed\n- Branches matching the pattern are no longer protected by this rule\n- Pushes and merges to matching branches are no longer restricted\n\nReturns success message on completion.",
        "operationId": "repoDeleteProtectionRule",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rule_id",
            "in": "path",
            "description": "Protection rule ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Protection rule deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or protection rule not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/protection/match": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "Match a branch name against protection rules",
        "description": "Checks if a branch name matches any protection rule in the repository.\nRequires read access to the repository.\n\nReturns the matching protection rule if found, or null if no rules match.\nUseful for determining what protections apply to a specific branch before performing operations.",
        "operationId": "repoMatchProtection",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "branch_name",
            "in": "query",
            "description": "Branch name to check against protection rules",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Branch protection check completed. Returns matching protection rule or null if no rules match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Option_BranchProtectionRule"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List pull requests in a repository",
        "description": "Returns a paginated list of pull requests, sorted by number (newest first).\nSupports filtering by state, author, and draft status.\nRequires read access to the repository.",
        "operationId": "prList",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filter by PR state (\"open\", \"closed\", \"merged\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "author_id",
            "in": "query",
            "description": "Filter by author user ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "draft",
            "in": "query",
            "description": "Filter by draft status",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of PRs to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of PRs to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PRs listed successfully. Returns filtered array of PR objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PullRequestDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Create a pull request",
        "description": "Creates a new pull request proposing changes from a source branch to a target branch.\nRequires at least Member role in the repository.\n\nParameters:\n- title: PR title (required)\n- body: PR description in markdown (optional)\n- source_repo_id: Source repository ID (supports cross-repo PRs from forks)\n- source_branch: Source branch name (must exist)\n- target_branch: Target branch name (must exist in the repo)\n- head_commit_sha: Head commit SHA from the source branch\n- base_commit_sha: Base commit SHA for diff calculation (optional)\n- draft: Whether this is a draft PR (optional, defaults to false)\n\nEffects:\n- PR is created with auto-incrementing number\n- PR status tracking is initialized\n- Author is automatically subscribed\n- Repository stats are updated\n\nReturns the created PR with full metadata.",
        "operationId": "prCreate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "PR creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "PR created successfully. Returns the newly created PR with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequestDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty title, non-existent branch/commit, or invalid fork relationship",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/labels": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List PR labels in a repository",
        "operationId": "prListLabels",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Labels listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrLabel"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repo not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Create a PR label. Requires Member role.",
        "operationId": "prCreateLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Label creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePrLabelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Label created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrLabel"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repo not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/labels/{label_id}": {
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Update a PR label. Requires Admin role.",
        "operationId": "prUpdateLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Label update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePrLabelParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Label updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrLabel"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (Admin required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Delete a PR label. Requires Admin role.",
        "operationId": "prDeleteLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (Admin required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Get a pull request by number",
        "description": "Returns detailed information about a specific pull request.\nRequires read access to the repository.",
        "operationId": "prGet",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR retrieved successfully. Returns complete PR with all metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequestDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Update a pull request",
        "description": "Updates an existing pull request's metadata such as title, body, target branch, and draft status.\nRequires write access to the PR (author or repository member).\n\nAll fields are optional; only provided fields are updated.\nReturns the updated PR with full metadata.",
        "operationId": "prUpdate",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "PR update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "PR updated successfully. Returns the updated PR with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to edit this PR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Delete a pull request",
        "description": "Soft-deletes a PR. Requires Admin role in the repository.\n\nReturns success message on completion.",
        "operationId": "prDelete",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/assignees": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List assignees of a PR",
        "operationId": "prListAssignees",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Assignees listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrAssignee"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/assignees/{user_id}": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Assign a user to a PR. Assignee is auto-subscribed.",
        "operationId": "prAssign",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID (UUID) to assign/unassign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "User assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrAssignee"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "User already assigned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Unassign a user from a PR",
        "operationId": "prUnassign",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "user_id",
            "in": "path",
            "description": "User ID (UUID) to assign/unassign",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User unassigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Assignee not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/check-runs": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List check runs for a PR",
        "operationId": "prListCheckRuns",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check runs listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrCheckRun"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Create a check run. Requires Member role.",
        "operationId": "prCreateCheckRun",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Check run parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCheckRunParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Check run created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrCheckRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/check-runs/{check_run_id}": {
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Update a check run. Requires Member role.",
        "operationId": "prUpdateCheckRun",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "check_run_id",
            "in": "path",
            "description": "Check run ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Check run update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCheckRunParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Check run updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrCheckRun"
                }
              }
            }
          },
          "400": {
            "description": "Invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Check run not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Delete a check run. Requires Admin role.",
        "operationId": "prDeleteCheckRun",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "check_run_id",
            "in": "path",
            "description": "Check run ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check run deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (Admin required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Check run not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/close": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Close a pull request",
        "description": "Closes an open PR without merging.\nRequires write access to the PR.\n\nReturns the closed PR.",
        "operationId": "prClose",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR closed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "400": {
            "description": "PR is not open",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/comments/{comment_id}": {
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Update a review comment (own comments only)",
        "operationId": "prUpdateReviewComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "description": "Comment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Update parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddReplyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Comment updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReviewComment"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot edit other users' comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Delete a review comment. Own comments or Admin role.",
        "operationId": "prDeleteReviewComment",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "description": "Comment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comment deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot delete other users' comments (Admin required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/comments/{comment_id}/reply": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Reply to a review comment",
        "operationId": "prAddReviewReply",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "description": "Comment ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Reply parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddReplyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Reply added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReviewComment"
                }
              }
            }
          },
          "400": {
            "description": "Empty body",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Comment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/commits": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List commits in a pull request",
        "description": "Returns a paginated list of all commits included in the PR, sorted by position.\nRequires read access to the repository.",
        "operationId": "prListCommits",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of commits to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of commits to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Commits listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrCommit"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/events": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List PR events (timeline). Returns chronological activity log.",
        "operationId": "prListEvents",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrEvent"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/files": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List changed files in a pull request",
        "description": "Returns a paginated list of all files changed in the PR, sorted by path.\nIncludes additions, deletions, and patch diffs for each file.\nRequires read access to the repository.",
        "operationId": "prListFiles",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of files to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of files to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Files listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrFile"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/labels": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List labels assigned to a PR",
        "operationId": "prListLabelRelations",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label relations listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrLabelRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/labels/{label_id}": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Assign a label to a PR",
        "operationId": "prAssignLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrLabelRelation"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR or label not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Unassign a label from a PR",
        "operationId": "prUnassignLabel",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "label_id",
            "in": "path",
            "description": "Label ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Label unassigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Label not assigned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/lock": {
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Lock or unlock a pull request conversation",
        "description": "When locked, only repository maintainers and admins can comment on the PR.\nRequires write access to the PR.\n\nReturns the updated PR.",
        "operationId": "prLock",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Lock/unlock parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LockPrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "PR lock status updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/merge": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Merge a pull request",
        "description": "Merges the source branch into the target branch.\nRequires at least Maintainer role in the repository.\n\nBranch protection rules are enforced:\n- Required approvals count (self-approval not allowed)\n- Required status checks must pass\n- Admins can bypass protection rules\n\nParameters:\n- strategy: Merge strategy (\"merge\", \"squash\", \"rebase\", default: \"merge\")\n- squash_title: Custom title for squash merge (optional)\n- squash_message: Custom message for squash merge (optional)\n- delete_source_branch: Delete source branch after merge (optional, only same-repo)\n\nReturns the merged PR with merge commit SHA.",
        "operationId": "prMerge",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Merge parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MergePrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "PR merged successfully. Returns the merged PR with merge commit SHA.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "400": {
            "description": "Cannot merge: PR not open, is draft, or branch protection requirements not met",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Maintainer role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or git merge failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/merge-strategy": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Get PR merge strategy",
        "description": "Returns the current merge strategy settings for a PR.\nRequires read access to the repository.",
        "operationId": "prGetMergeStrategy",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Merge strategy retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrMergeStrategy"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR or merge strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Update PR merge strategy",
        "description": "Updates the merge strategy settings for a PR.\nRequires write access to the PR.\n\nUpdatable fields:\n- strategy: Merge strategy type (\"merge\", \"squash\", \"rebase\")\n- auto_merge: Enable auto-merge when all checks pass\n- squash_title: Custom title for squash merge\n- squash_message: Custom message for squash merge\n- delete_source_branch: Delete source branch after merge\n- merge_when_checks_pass: Auto-merge when checks pass\n\nAll fields are optional; only provided fields are updated.",
        "operationId": "prUpdateMergeStrategy",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Merge strategy update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMergeStrategyParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Merge strategy updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrMergeStrategy"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: unsupported strategy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/mute": {
      "put": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Mute or unmute notifications for a PR",
        "operationId": "prMute",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Mute/unmute parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MutePrParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Mute status updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reactions": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List reactions on a PR",
        "operationId": "prListReactions",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reactions listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrReaction"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Add a reaction to a PR",
        "operationId": "prAddReaction",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Reaction parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReactionParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Reaction added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReaction"
                }
              }
            }
          },
          "400": {
            "description": "Invalid content or target type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reactions/{reaction_id}": {
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Remove a reaction. Only the reaction author can remove it.",
        "operationId": "prRemoveReaction",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "reaction_id",
            "in": "path",
            "description": "Reaction ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reaction removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Cannot remove another user's reaction",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/ready": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Mark a draft PR as ready for review",
        "description": "Converts a draft pull request to a ready-for-review state.\nRequires write access to the PR.\n\nEffects:\n- Draft flag is set to false\n- A \"DraftReady\" event is logged\n- Reviewers are notified that the PR is ready\n\nReturns the updated PR.",
        "operationId": "prMarkReady",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR marked as ready for review.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "400": {
            "description": "PR is already ready for review",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reopen": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Reopen a pull request",
        "description": "Reopens a closed (but not merged) PR.\nRequires write access to the PR.\n\nReturns the reopened PR.",
        "operationId": "prReopen",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR reopened successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PullRequest"
                }
              }
            }
          },
          "400": {
            "description": "PR is not closed or already merged",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reviews": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List reviews on a PR",
        "operationId": "prListReviews",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reviews listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrReviewDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Create a review. States: pending, approved, changes_requested, commented. Authors cannot approve their own PRs.",
        "operationId": "prCreateReview",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "Review parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReviewParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Review created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReviewDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid state or self-approval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reviews/{review_id}/comments": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List comments for a specific review",
        "operationId": "prListReviewComments",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "review_id",
            "in": "path",
            "description": "Review ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Review comments listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrReviewComment"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Review not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reviews/{review_id}/dismiss": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Dismiss a submitted review. Requires Admin role.",
        "operationId": "prDismissReview",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "review_id",
            "in": "path",
            "description": "Review ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Dismiss parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DismissReviewParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Review dismissed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReviewDetail"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (Admin required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Review not found or not submitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/reviews/{review_id}/submit": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Submit a pending review. Changes its state to approved, changes_requested, or commented.",
        "operationId": "prSubmitReview",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "review_id",
            "in": "path",
            "description": "Review ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Submit parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitReviewParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Review submitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrReviewDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid state or self-approval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Review not found or already submitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/status": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Get PR status summary",
        "description": "Returns the current status of a PR including checks state, mergeability,\napproval count, and file change statistics.\nRequires read access to the repository.",
        "operationId": "prGetStatus",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PR status retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrStatus"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR or status not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/subscribe": {
      "post": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Subscribe to a PR to receive notifications",
        "operationId": "prSubscribe",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_PrSubscription"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Already subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "Unsubscribe from a PR",
        "operationId": "prUnsubscribe",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unsubscribed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/prs/{number}/subscriptions": {
      "get": {
        "tags": [
          "Pull Requests"
        ],
        "summary": "List subscriptions on a PR",
        "operationId": "prListSubscriptions",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "description": "PR number (unique within the repository)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Subscriptions listed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_PrSubscription"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "PR not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List releases in a repository",
        "description": "Returns a paginated list of all releases in the repository, sorted by creation date (newest first).\nIncludes release metadata such as:\n- Release name and tag\n- Release notes and description\n- Author and creation date\n- Draft and prerelease status\n- Asset download URLs\n\nRequires read access to the repository.",
        "operationId": "repoListReleases",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of releases to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of releases to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Releases listed successfully. Returns an array of release objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoRelease"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a new release",
        "description": "Creates a new release in the repository, optionally creating a tag if it doesn't exist.\nRequires Write role or higher in the repository.\n\nParameters:\n- tag_name: Tag name for the release (will be created if it doesn't exist)\n- name: Release name/title (required)\n- body: Release notes in markdown format (optional, max 10000 characters)\n- draft: Whether this is a draft release (default: false)\n- prerelease: Whether this is a prerelease (default: false)\n- target_commitish: Commit SHA or branch name to tag (defaults to default branch)\n\nReturns the created release with metadata including download URLs for assets.",
        "operationId": "repoCreateRelease",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Release creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReleaseParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Release created successfully. Returns the newly created release with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoRelease"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: name too long, invalid tag name, or target commit doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or target commit not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Release with this tag already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git operation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/releases/{release_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetRelease",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "release_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Release retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoRelease"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Release not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Repos"
        ],
        "summary": "Update a release",
        "description": "Updates release metadata such as name, description, draft status, and prerelease flag.\nRequires Write role or higher in the repository.\n\nUpdatable fields:\n- name: Release name/title (max 255 characters)\n- body: Release notes in markdown format (max 10000 characters)\n- draft: Whether this is a draft release\n- prerelease: Whether this is a prerelease\n\nAll fields are optional; only provided fields are updated.\nReturns the updated release with full metadata.",
        "operationId": "repoUpdateRelease",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "release_id",
            "in": "path",
            "description": "Release ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Release update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReleaseParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Release updated successfully. Returns the updated release with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoRelease"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: name too long or invalid characters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or release not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Delete a release",
        "description": "Permanently deletes a release from the repository. The associated tag and commits are not deleted.\nRequires Write role or higher in the repository.\n\nEffects:\n- Release metadata is permanently removed\n- Release assets are deleted\n- The associated tag remains in the repository\n- The tagged commits remain in the repository history\n\nReturns success message on completion.",
        "operationId": "repoDeleteRelease",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "release_id",
            "in": "path",
            "description": "Release ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Release deleted successfully. The release and its assets have been permanently removed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or release not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/star": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Star a repository",
        "description": "Adds the current user to the repository's stargazers list.\nRequires read access to the repository.\n\nEffects:\n- User is added to the repository's stargazers\n- Repository star count is incremented\n- User can unstar later to remove themselves\n\nReturns success message on completion. Idempotent operation (starring an already starred repository is a no-op).",
        "operationId": "repoStar",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository starred successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Unstar a repository",
        "description": "Removes the current user from the repository's stargazers list.\nRequires read access to the repository.\n\nEffects:\n- User is removed from the repository's stargazers\n- Repository star count is decremented\n\nReturns success message on completion. Idempotent operation (unstarring an unstarred repository is a no-op).",
        "operationId": "repoUnstar",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository unstarred successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stargazers": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List stargazers of a repository",
        "description": "Returns a paginated list of users who have starred the repository, sorted by star date (newest first).\nIncludes stargazer metadata such as:\n- User information (ID, username, display name)\n- Star timestamp\n\nRequires read access to the repository.",
        "operationId": "repoListStargazers",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of stargazers to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of stargazers to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stargazers listed successfully. Returns an array of stargazer objects with user information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoStar"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stats": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "Get repository statistics",
        "description": "Returns comprehensive statistics for a repository including:\n- Star count and watcher count\n- Fork count\n- Branch and tag counts\n- Commit count\n- Release count\n- Open issues and pull requests count\n- Storage size and bandwidth usage\n- Last push timestamp\n\nRequires read access to the repository.",
        "operationId": "repoGetStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository statistics retrieved successfully. Returns comprehensive repository metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoStats"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/stats/refresh": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Refresh repository statistics",
        "description": "Recalculates and updates repository statistics from the current state of the repository.\nRequires Admin role or higher in the repository.\n\nEffects:\n- Recalculates star, watcher, and fork counts\n- Recalculates branch and tag counts\n- Recalculates commit count from Git history\n- Recalculates release count\n- Recalculates open issues and pull requests count\n- Updates storage size and bandwidth usage\n- Updates last push timestamp\n\nReturns the refreshed statistics with all updated values.",
        "operationId": "repoRefreshStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository statistics refreshed successfully. Returns all updated metrics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoStats"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git operation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/statuses": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a commit status",
        "description": "Creates a new status check for a specific commit, typically used by CI/CD systems.\nRequires Write role or higher in the repository.\n\nParameters:\n- commit_sha: Commit SHA to attach the status to (must exist in repository)\n- state: Status state (\"pending\", \"success\", \"failure\", \"error\")\n- context: Status context name (e.g., \"ci/build\", \"ci/test\") - must be unique per commit\n- description: Human-readable description of the status (optional, max 500 characters)\n- target_url: URL with detailed information about the status (optional)\n\nEffects:\n- Status is attached to the commit\n- Can be used by branch protection rules to enforce status checks\n- Multiple statuses can exist for the same commit with different contexts\n\nReturns the created status with metadata including ID and timestamps.",
        "operationId": "repoCreateCommitStatus",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Commit status creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCommitStatusParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Commit status created successfully. Returns the newly created status with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoCommitStatus"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid state, context too long, or commit doesn't exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or commit not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Status with this context already exists for this commit (use update instead)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/sync": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Sync a fork with upstream",
        "description": "Synchronizes a forked repository with the latest changes from the parent repository.\nRequires Write role or higher in the fork repository.\n\nEffects:\n- Merges changes from the parent repository's default branch into the fork\n- Creates a merge commit if there are conflicts\n- Updates the fork's commit history\n\nOnly works on repositories that are forks (have a parent repository).\nReturns success message on completion.",
        "operationId": "repoSyncFork",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Fork synchronized successfully with upstream repository.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Repository is not a fork or has merge conflicts that require manual resolution",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Write role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or parent repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Merge conflicts detected; manual resolution required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error or Git operation failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoListTags",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tags listed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_ListTagsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoCreateTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTagBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Tag created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/tags/{tag_name}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Tag"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoUpdateTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTagBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Tag updated (delete+recreate if renamed)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Tag"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoDeleteTag",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Tag not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/transfer-owner": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Transfer repository ownership",
        "description": "Transfers ownership of a repository to another user. The new owner must be an existing repository member.\nRequires Owner role in the repository.\n\nEffects:\n- Current owner becomes an Admin\n- New owner gains full Owner permissions\n- Repository URL remains unchanged\n- All forks and stars are preserved\n\nReturns the updated repository with new owner information.",
        "operationId": "repoTransferOwner",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Transfer ownership parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferOwnerParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Ownership transferred successfully. Returns the repository with updated owner information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoDetail"
                }
              }
            }
          },
          "400": {
            "description": "Invalid new owner ID or user is not a repository member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Owner role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or new owner not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/unarchive": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Unarchive a repository",
        "description": "Restores an archived repository to active status, re-enabling all write operations.\nRequires Owner role in the repository.\n\nEffects:\n- Repository status changes from \"archived\" to \"active\"\n- All write operations are re-enabled\n- Previous visibility and settings are preserved\n\nReturns success message on completion.",
        "operationId": "repoUnarchive",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository unarchived successfully. All write operations are now enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Owner role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Repository is not archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/watch": {
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Watch a repository",
        "description": "Subscribes the current user to notifications for repository activities.\nRequires read access to the repository.\n\nWatch levels:\n- \"participating\": Notifications for issues/PRs you're involved in\n- \"watching\": All repository notifications (default)\n- \"ignoring\": No notifications\n\nReturns success message on completion. Idempotent operation.",
        "operationId": "repoWatch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Watch parameters (level is optional, defaults to 'watching')",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WatchParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Repository watch subscription updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "400": {
            "description": "Invalid watch level (must be 'participating', 'watching', or 'ignoring')",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Unwatch a repository",
        "description": "Removes the current user's watch subscription from the repository.\nRequires read access to the repository.\n\nEffects:\n- User is removed from the repository's watchers\n- User will no longer receive notifications for repository activities\n\nReturns success message on completion. Idempotent operation (unwatching an unwatched repository is a no-op).",
        "operationId": "repoUnwatch",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository watch subscription removed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/watchers": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List watchers of a repository",
        "description": "Returns a paginated list of users who are watching the repository, sorted by watch date (newest first).\nIncludes watcher metadata such as:\n- User information (ID, username, display name)\n- Watch level (participating, watching, or ignoring)\n- Watch timestamp\n\nRequires read access to the repository.",
        "operationId": "repoListWatchers",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of watchers to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of watchers to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Watchers listed successfully. Returns an array of watcher objects with user information and watch level.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoWatch"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks": {
      "get": {
        "tags": [
          "Repos"
        ],
        "summary": "List webhooks in a repository",
        "description": "Returns a paginated list of all webhooks in the repository, sorted by creation date (newest first).\nIncludes webhook metadata such as:\n- Webhook URL and events\n- Active status\n- Last delivery status and timestamp\n- Creator information\n\nRequires Admin role or higher in the repository.",
        "operationId": "repoListWebhooks",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of webhooks to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of webhooks to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhooks listed successfully. Returns an array of webhook objects with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_RepoWebhook"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Repos"
        ],
        "summary": "Create a webhook in a repository",
        "description": "Creates a new webhook that receives HTTP POST notifications for repository events.\nRequires Admin role or higher in the repository.\n\nParameters:\n- url: Webhook endpoint URL (must be HTTPS in production)\n- events: List of events to subscribe to (e.g., \"push\", \"pull_request\", \"issue\")\n- secret: Optional secret for webhook signature verification\n- active: Whether the webhook is active (default: true)\n\nEffects:\n- Webhook is created and starts receiving events\n- Webhook deliveries are logged and can be retried on failure\n\nReturns the created webhook with metadata including ID and configuration.",
        "operationId": "repoCreateWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Webhook creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Webhook created successfully. Returns the newly created webhook with metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid URL format or empty events list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoGetWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoWebhook"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Repos"
        ],
        "summary": "Update a webhook in a repository",
        "description": "Updates webhook configuration such as URL, events, secret, and active status.\nRequires Admin role or higher in the repository.\n\nUpdatable fields:\n- url: Webhook endpoint URL (must be HTTPS in production)\n- events: List of events to subscribe to\n- secret: Secret for webhook signature verification\n- active: Whether the webhook is active\n\nAll fields are optional; only provided fields are updated.\nReturns the updated webhook with full metadata.",
        "operationId": "repoUpdateWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Webhook update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Webhook updated successfully. Returns the updated webhook with full metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_RepoWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: invalid URL format or empty events list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Repos"
        ],
        "summary": "Delete a webhook from a repository",
        "description": "Permanently removes a webhook from the repository, stopping all event notifications.\nRequires Admin role or higher in the repository.\n\nEffects:\n- Webhook is permanently removed from the repository\n- Webhook stops receiving event notifications immediately\n- Webhook delivery history is deleted\n\nReturns success message on completion.",
        "operationId": "repoDeleteWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID (UUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository, workspace, or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoListWebhookDeliveries",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deliveries listed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry": {
      "post": {
        "tags": [
          "Repos"
        ],
        "operationId": "repoRetryWebhookDelivery",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook delivery retried successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook or delivery not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki": {
      "get": {
        "tags": [
          "Wiki"
        ],
        "summary": "List wiki pages in a repository",
        "description": "Returns a paginated list of all wiki pages in the repository.\nSupports searching by title or content.\nRequires read access to the repository.",
        "operationId": "wikiListPages",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search query to filter pages by title or content",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of pages to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of pages to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wiki pages listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WikiPage"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "Wiki"
        ],
        "summary": "Create a wiki page",
        "description": "Creates a new wiki page in the repository.\nRequires at least Member role in the repository.\n\nThe title is automatically converted to a URL-friendly slug.\nAn initial revision is created with the page.\n\nReturns the created wiki page with full metadata.",
        "operationId": "wikiCreatePage",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Wiki page creation parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWikiPageParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Wiki page created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters: empty title or content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Repository or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki/{slug}": {
      "get": {
        "tags": [
          "Wiki"
        ],
        "summary": "Get a wiki page",
        "description": "Retrieves a single wiki page by its slug.\nRequires read access to the repository.",
        "operationId": "wikiGetPage",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wiki page retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiPage"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Wiki"
        ],
        "summary": "Update a wiki page",
        "description": "Updates an existing wiki page's title, content, or both.\nRequires at least Member role in the repository.\n\nA new revision is automatically created with the changes.\nOptionally include a commit message to describe the changes.\n\nAll fields are optional; only provided fields are updated.\nReturns the updated wiki page.",
        "operationId": "wikiUpdatePage",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Wiki page update parameters (all fields optional)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWikiPageParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Wiki page updated successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Wiki"
        ],
        "summary": "Delete a wiki page",
        "description": "Soft-deletes a wiki page. The page is marked as deleted but remains in the database.\nRequires Admin role in the repository.\n\nThe page and its revision history are preserved but no longer accessible via the API.\nReturns success message on completion.",
        "operationId": "wikiDeletePage",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wiki page deleted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_String"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Admin role)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki/{slug}/compare": {
      "get": {
        "tags": [
          "Wiki"
        ],
        "summary": "Compare two wiki page revisions",
        "description": "Compares two versions of a wiki page and returns both revisions.\nRequires read access to the repository.\n\nReturns the old and new revisions for client-side diff computation.\nThe client can compute the diff between the two content snapshots.",
        "operationId": "wikiCompareRevisions",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "old_version",
            "in": "query",
            "description": "Older version number to compare from",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "new_version",
            "in": "query",
            "description": "Newer version number to compare to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revisions compared successfully. Returns old and new revision objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiCompareResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid version numbers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, revisions, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki/{slug}/revert": {
      "post": {
        "tags": [
          "Wiki"
        ],
        "summary": "Revert a wiki page to a historical version",
        "description": "Reverts the wiki page to a specified historical version.\nRequires at least Member role in the repository.\n\nThis creates a new revision with the content from the target version.\nThe current content is not lost; it remains in the revision history.\n\nReturns the updated wiki page with the reverted content.",
        "operationId": "wikiRevertPage",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "query",
            "description": "Target version number to revert to",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "commit_message",
            "in": "query",
            "description": "Optional commit message describing the revert",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wiki page reverted successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiPage"
                }
              }
            }
          },
          "400": {
            "description": "Invalid version number",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions (requires Member role or higher)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, revision, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki/{slug}/revisions": {
      "get": {
        "tags": [
          "Wiki"
        ],
        "summary": "List wiki page revisions",
        "description": "Returns a paginated list of all revisions for a wiki page, sorted by version (newest first).\nRequires read access to the repository.\n\nEach revision includes the full content snapshot at that version,\nthe editor who made the change, and an optional commit message.",
        "operationId": "wikiListRevisions",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of revisions to return (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of revisions to skip for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revisions listed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WikiPageRevision"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/repos/{repo_name}/wiki/{slug}/revisions/{version}": {
      "get": {
        "tags": [
          "Wiki"
        ],
        "summary": "Get a specific wiki page revision",
        "description": "Retrieves a specific revision of a wiki page by version number.\nRequires read access to the repository.\n\nReturns the full revision with content snapshot, editor, and commit message.",
        "operationId": "wikiGetRevision",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name (unique identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo_name",
            "in": "path",
            "description": "Repository name (unique within the workspace)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "description": "Wiki page slug (URL-friendly identifier)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "version",
            "in": "path",
            "description": "Revision version number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revision retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WikiPageRevision"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required or session expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to access this repository",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Wiki page, revision, repository, or workspace not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      }
    },
    "/api/v1/workspaces/{workspace_name}/restore": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Restore a soft-deleted workspace",
        "description": "Restore a workspace that was previously soft-deleted. Requires owner role.",
        "operationId": "workspaceRestore",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace restored.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or not deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/settings": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get workspace settings",
        "description": "Return workspace settings — readable by anyone with workspace access.",
        "operationId": "workspaceGetSettings",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceSettings"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or not readable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update workspace settings",
        "description": "Update workspace settings such as repo visibility defaults, feature toggles, and member invite permissions. Requires admin role.",
        "operationId": "workspaceUpdateSettings",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Settings update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWorkspaceSettingsParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Settings updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceSettings"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/stats": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Get workspace statistics",
        "description": "Return workspace statistics including member, repository, issue, and pull request counts. Readable by anyone with workspace access.",
        "operationId": "workspaceGetStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceStats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or not readable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/stats/refresh": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Refresh workspace statistics",
        "description": "Recalculate workspace statistics by counting members, repos, issues, and PRs from live data. Requires admin role.",
        "operationId": "workspaceRefreshStats",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Refreshed statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceStats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read or write failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/transfer-owner": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Transfer workspace ownership",
        "description": "Transfer workspace ownership to another active member. The current owner becomes admin.",
        "operationId": "workspaceTransferOwner",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "New owner user ID.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransferOwnerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Ownership transferred.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceDetail"
                }
              }
            }
          },
          "400": {
            "description": "New owner must be an active member and different from current owner.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/unarchive": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Unarchive a workspace",
        "description": "Restore an archived workspace to active status. Requires owner role.",
        "operationId": "workspaceUnarchive",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Workspace unarchived.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Workspace not found or not archived.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/webhooks": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List webhooks",
        "description": "Return webhooks configured for the workspace. Requires admin role.",
        "operationId": "workspaceListWebhooks",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_Vec_WorkspaceWebhook"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database read failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Create a webhook",
        "description": "Create a webhook for the workspace. Requires admin role. The URL must use HTTPS and cannot point to localhost or internal IPs.",
        "operationId": "workspaceCreateWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "HTTPS webhook URL, optional secret ciphertext, event types, and active flag.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Webhook created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL, missing events, or SSRF check failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "operationId": "workspaceGetWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceWebhook"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "session_cookie": []
          }
        ]
      },
      "put": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Update a webhook",
        "description": "Update a webhook's URL, secret, events, or active state. Requires admin role.",
        "operationId": "workspaceUpdateWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Webhook update parameters — only included fields are changed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Webhook updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiResponse_WorkspaceWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Invalid URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Delete a webhook",
        "description": "Remove a webhook from the workspace. Requires admin role.",
        "operationId": "workspaceDeleteWebhook",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Database transaction failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "Workspaces"
        ],
        "summary": "List webhook deliveries",
        "description": "Return delivery logs for a webhook. Requires admin role.",
        "operationId": "workspaceListWebhookDeliveries",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of deliveries (currently empty).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListResponse_Value"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workspaces/{workspace_name}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry": {
      "post": {
        "tags": [
          "Workspaces"
        ],
        "summary": "Retry a webhook delivery",
        "description": "Retry a failed webhook delivery. Requires admin role.",
        "operationId": "workspaceRetryWebhookDelivery",
        "parameters": [
          {
            "name": "workspace_name",
            "in": "path",
            "description": "Workspace name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "delivery_id",
            "in": "path",
            "description": "Delivery ID.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Retry scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiEmptyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated or insufficient role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Delivery not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AcceptInvitationParams": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "Invitation token (received via email)"
          }
        }
      },
      "AcceptInvitationRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "The plaintext invitation token from the email link."
          }
        }
      },
      "AddDeployKeyParams": {
        "type": "object",
        "required": [
          "title",
          "public_key",
          "key_type"
        ],
        "properties": {
          "key_type": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "title": {
            "type": "string"
          }
        }
      },
      "AddDomainParams": {
        "type": "object",
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string"
          }
        }
      },
      "AddGpgKeyParams": {
        "type": "object",
        "required": [
          "public_key",
          "key_id"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "key_id": {
            "type": "string"
          },
          "primary_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "public_key": {
            "type": "string"
          }
        }
      },
      "AddMemberParams": {
        "type": "object",
        "required": [
          "user_id"
        ],
        "properties": {
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AddReplyParams": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          }
        }
      },
      "AddRepoMemberParams": {
        "type": "object",
        "required": [
          "user_id"
        ],
        "properties": {
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AddSshKeyParams": {
        "type": "object",
        "required": [
          "title",
          "public_key",
          "key_type"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "key_type": {
            "type": "string"
          },
          "public_key": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "ApiEmptyResponse": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable success message."
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Stable, client-safe error message."
          }
        }
      },
      "ApiListResponse_Value": {
        "type": "object",
        "required": [
          "data",
          "total",
          "page",
          "per_page"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {}
          },
          "page": {
            "type": "integer",
            "format": "int64"
          },
          "per_page": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ApiResponse_AvatarData": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "avatar_url",
              "storage_key"
            ],
            "properties": {
              "avatar_url": {
                "type": "string"
              },
              "storage_key": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_BlameResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "hunks",
              "truncated"
            ],
            "properties": {
              "hunks": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BlameHunk"
                }
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              },
              "truncated": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ApiResponse_Blob": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "path",
              "mode",
              "size",
              "data",
              "encoding",
              "binary",
              "truncated",
              "is_lfs"
            ],
            "properties": {
              "binary": {
                "type": "boolean"
              },
              "data": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              },
              "encoding": {
                "type": "string"
              },
              "is_lfs": {
                "type": "boolean"
              },
              "mode": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "path": {
                "type": "string"
              },
              "recent_commit": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RecentCommit"
                  }
                ]
              },
              "size": {
                "type": "integer",
                "format": "int64"
              },
              "truncated": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ApiResponse_Branch": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "name",
              "full_ref",
              "is_default",
              "is_head",
              "is_merged",
              "is_detached"
            ],
            "properties": {
              "commit": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Commit"
                  }
                ]
              },
              "full_ref": {
                "type": "string"
              },
              "is_default": {
                "type": "boolean"
              },
              "is_detached": {
                "type": "boolean"
              },
              "is_head": {
                "type": "boolean"
              },
              "is_merged": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "target_oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "upstream": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/BranchUpstream"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_BranchMergeCheck": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "allowed",
              "reasons"
            ],
            "properties": {
              "allowed": {
                "type": "boolean"
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_BranchProtectionRule": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "pattern",
              "require_approvals",
              "require_status_checks",
              "required_status_checks",
              "require_linear_history",
              "allow_force_pushes",
              "allow_deletions",
              "require_signed_commits",
              "require_code_owner_review",
              "dismiss_stale_reviews",
              "restrict_pushes",
              "push_allowances",
              "restrict_review_dismissal",
              "dismissal_allowances",
              "require_conversation_resolution",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "allow_deletions": {
                "type": "boolean"
              },
              "allow_force_pushes": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "dismiss_stale_reviews": {
                "type": "boolean"
              },
              "dismissal_allowances": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "pattern": {
                "type": "string"
              },
              "push_allowances": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "require_approvals": {
                "type": "integer",
                "format": "int32"
              },
              "require_code_owner_review": {
                "type": "boolean"
              },
              "require_conversation_resolution": {
                "type": "boolean"
              },
              "require_linear_history": {
                "type": "boolean"
              },
              "require_signed_commits": {
                "type": "boolean"
              },
              "require_status_checks": {
                "type": "boolean"
              },
              "required_status_checks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "restrict_pushes": {
                "type": "boolean"
              },
              "restrict_review_dismissal": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_CaptchaResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "base64",
              "req"
            ],
            "properties": {
              "base64": {
                "type": "string"
              },
              "req": {
                "$ref": "#/components/schemas/CaptchaQuery"
              },
              "rsa": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RsaResponse"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_Channel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "created_by",
              "name",
              "channel_type",
              "channel_kind",
              "visibility",
              "nsfw",
              "archived",
              "read_only",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived": {
                "type": "boolean"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "available_tags": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "bitrate": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "category_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "channel_kind": {
                "$ref": "#/components/schemas/ChannelKind"
              },
              "channel_type": {
                "$ref": "#/components/schemas/ChannelType"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "default_auto_archive_duration": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "default_forum_layout": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ForumLayout"
                  }
                ]
              },
              "default_reaction_emoji": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "default_sort_order": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ForumSortOrder"
                  }
                ]
              },
              "default_thread_rate_limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_message_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_message_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "nsfw": {
                "type": "boolean"
              },
              "parent_channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "position": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "rate_limit_per_user": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "read_only": {
                "type": "boolean"
              },
              "repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "require_tag": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "rtc_region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "topic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_ChannelCategory": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "name",
              "position",
              "collapsed",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "collapsed": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "position": {
                "type": "integer",
                "format": "int32"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_ChannelDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "creator",
              "name",
              "channel_type",
              "channel_kind",
              "visibility",
              "nsfw",
              "archived",
              "read_only",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived": {
                "type": "boolean"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "bitrate": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "category_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "channel_kind": {
                "$ref": "#/components/schemas/ChannelKind"
              },
              "channel_type": {
                "$ref": "#/components/schemas/ChannelType"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "creator": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_message_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_message_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "nsfw": {
                "type": "boolean"
              },
              "parent_channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "position": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "read_only": {
                "type": "boolean"
              },
              "repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "rtc_region": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "topic": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_ChannelMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "channel_id",
              "user_id",
              "role",
              "status",
              "muted",
              "pinned",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "channel_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "joined_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_read_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_read_message_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "left_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "muted": {
                "type": "boolean"
              },
              "pinned": {
                "type": "boolean"
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_Commit": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "abbreviated_oid",
              "parent_oids",
              "subject",
              "body",
              "message",
              "trailers",
              "raw"
            ],
            "properties": {
              "abbreviated_oid": {
                "type": "string"
              },
              "author": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Signature"
                  }
                ]
              },
              "authored_at": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                ]
              },
              "body": {
                "type": "string"
              },
              "committed_at": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Timestamp"
                  }
                ]
              },
              "committer": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Signature"
                  }
                ]
              },
              "message": {
                "type": "string"
              },
              "oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "parent_oids": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Oid"
                }
              },
              "raw": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              },
              "signature": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/VerifiedSignature"
                  }
                ]
              },
              "stats": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CommitStats"
                  }
                ]
              },
              "subject": {
                "type": "string"
              },
              "trailers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CommitTrailer"
                }
              },
              "tree_oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_CompareCommitsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "commits"
            ],
            "properties": {
              "commits": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Commit"
                }
              },
              "merge_base": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              },
              "stats": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CommitStats"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_ContextMe": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "username",
              "has_unread_notifications",
              "language",
              "timezone"
            ],
            "properties": {
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "has_unread_notifications": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "language": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "username": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_CreateCommitResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "branch"
            ],
            "properties": {
              "branch": {
                "type": "string"
              },
              "commit": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Commit"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_CreateInvitationResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "invitation"
            ],
            "properties": {
              "invitation": {
                "$ref": "#/components/schemas/WorkspaceInvitation"
              }
            }
          }
        }
      },
      "ApiResponse_CreatePersonalAccessTokenResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "scopes",
              "token",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Scope"
                }
              },
              "token": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_DiffStats": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "additions",
              "deletions",
              "changed_files"
            ],
            "properties": {
              "additions": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "changed_files": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "deletions": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_EmailResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_Enable2FAResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "secret",
              "qr_code",
              "backup_codes"
            ],
            "properties": {
              "backup_codes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "qr_code": {
                "type": "string"
              },
              "secret": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_Get2FAStatusResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "is_enabled",
              "has_backup_codes"
            ],
            "properties": {
              "has_backup_codes": {
                "type": "boolean"
              },
              "is_enabled": {
                "type": "boolean"
              },
              "method": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_GetDiffResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "files",
              "overflow"
            ],
            "properties": {
              "files": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DiffFile"
                }
              },
              "overflow": {
                "type": "boolean"
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              },
              "stats": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DiffStats"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_Issue": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "author_id",
              "number",
              "title",
              "state",
              "priority",
              "visibility",
              "locked",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "closed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "locked": {
                "type": "boolean"
              },
              "milestone_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "number": {
                "type": "integer",
                "format": "int64"
              },
              "priority": {
                "$ref": "#/components/schemas/Priority"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueAssignee": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "assignee_id",
              "created_at"
            ],
            "properties": {
              "assigned_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "assignee_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "author_id",
              "body",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "edited_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "reply_to_comment_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_IssueCommentDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "author",
              "body",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "body": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "reply_to_comment_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_IssueDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "author",
              "number",
              "title",
              "state",
              "priority",
              "visibility",
              "locked",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "closed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "locked": {
                "type": "boolean"
              },
              "milestone_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "number": {
                "type": "integer",
                "format": "int64"
              },
              "priority": {
                "$ref": "#/components/schemas/Priority"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueEvent": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "event_type",
              "created_at"
            ],
            "properties": {
              "actor_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "event_type": {
                "$ref": "#/components/schemas/EventType"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "metadata": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "new_value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "old_value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_IssueLabel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "name",
              "color",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_IssueLabelRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "label_id",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "label_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueMilestone": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "title",
              "state",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "closed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_IssuePrRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "pull_request_id",
              "relation_type",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "relation_type": {
                "$ref": "#/components/schemas/RelationType"
              }
            }
          }
        }
      },
      "ApiResponse_IssueReaction": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "user_id",
              "content",
              "target_type",
              "created_at"
            ],
            "properties": {
              "content": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "$ref": "#/components/schemas/TargetType"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueRepoRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "repo_id",
              "relation_type",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "relation_type": {
                "$ref": "#/components/schemas/RelationType"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueSubscriber": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "issue_id",
              "user_id",
              "reason",
              "muted",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": "string",
                "format": "uuid"
              },
              "muted": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_IssueTemplate": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "name",
              "body_template",
              "labels",
              "active",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "active": {
                "type": "boolean"
              },
              "body_template": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "labels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "name": {
                "type": "string"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "title_template": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_ListBranchesResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "branches"
            ],
            "properties": {
              "branches": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Branch"
                }
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_ListCommitsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "commits"
            ],
            "properties": {
              "commits": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Commit"
                }
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_ListMergeConflictsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "conflicts"
            ],
            "properties": {
              "conflicts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MergeConflict"
                }
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_ListTagsResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "tags"
            ],
            "properties": {
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Tag"
                }
              }
            }
          }
        }
      },
      "ApiResponse_ListTreeResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "entries",
              "truncated"
            ],
            "properties": {
              "entries": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TreeEntry"
                }
              },
              "page_info": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PageInfo"
                  }
                ]
              },
              "truncated": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ApiResponse_MergeResult": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "status",
              "conflicts",
              "message"
            ],
            "properties": {
              "commit": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Commit"
                  }
                ]
              },
              "conflicts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MergeConflict"
                }
              },
              "merge_base": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "message": {
                "type": "string"
              },
              "stats": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DiffStats"
                  }
                ]
              },
              "status": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_Notification": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "notification_type",
              "title",
              "priority",
              "metadata",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "action_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "actor_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dismissed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "message_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "metadata": {},
              "notification_type": {
                "$ref": "#/components/schemas/NotificationType"
              },
              "priority": {
                "$ref": "#/components/schemas/Priority"
              },
              "pull_request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "read_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TargetType"
                  }
                ]
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_NotificationBlock": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "target_type",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "channel": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeliveryChannel"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "notification_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/NotificationType"
                  }
                ]
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "$ref": "#/components/schemas/TargetType"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_NotificationDelivery": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "notification_id",
              "user_id",
              "channel",
              "status",
              "attempts",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "attempts": {
                "type": "integer",
                "format": "int32"
              },
              "channel": {
                "$ref": "#/components/schemas/DeliveryChannel"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "delivered_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "destination": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "failed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_error": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "notification_id": {
                "type": "string",
                "format": "uuid"
              },
              "provider": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Provider"
                  }
                ]
              },
              "provider_message_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scheduled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "sent_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_NotificationDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "notification_type",
              "title",
              "priority",
              "metadata",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "action_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "actor": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UserBaseInfo"
                  }
                ]
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "channel_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dismissed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "issue_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "message_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "metadata": {},
              "notification_type": {
                "$ref": "#/components/schemas/NotificationType"
              },
              "priority": {
                "$ref": "#/components/schemas/Priority"
              },
              "pull_request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "read_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "repo": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RepoBaseInfo"
                  }
                ]
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/TargetType"
                  }
                ]
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/WorkspaceBaseInfo"
                  }
                ]
              }
            }
          }
        }
      },
      "ApiResponse_NotificationSubscription": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "target_type",
              "event_types",
              "channels",
              "level",
              "muted",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "channels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "event_types": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EventType"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "level": {
                "$ref": "#/components/schemas/SubscriptionLevel"
              },
              "muted": {
                "type": "boolean"
              },
              "muted_until": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "$ref": "#/components/schemas/TargetType"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_NotificationTemplate": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "key",
              "notification_type",
              "channel",
              "locale",
              "title_template",
              "body_template",
              "enabled",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "action_text_template": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "body_template": {
                "type": "string"
              },
              "channel": {
                "$ref": "#/components/schemas/DeliveryChannel"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "enabled": {
                "type": "boolean"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "key": {
                "type": "string"
              },
              "locale": {
                "type": "string"
              },
              "notification_type": {
                "$ref": "#/components/schemas/NotificationType"
              },
              "subject_template": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title_template": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_Option_BranchProtectionRule": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "id",
                  "repo_id",
                  "pattern",
                  "require_approvals",
                  "require_status_checks",
                  "required_status_checks",
                  "require_linear_history",
                  "allow_force_pushes",
                  "allow_deletions",
                  "require_signed_commits",
                  "require_code_owner_review",
                  "dismiss_stale_reviews",
                  "restrict_pushes",
                  "push_allowances",
                  "restrict_review_dismissal",
                  "dismissal_allowances",
                  "require_conversation_resolution",
                  "created_at",
                  "updated_at"
                ],
                "properties": {
                  "allow_deletions": {
                    "type": "boolean"
                  },
                  "allow_force_pushes": {
                    "type": "boolean"
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "created_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "uuid"
                  },
                  "dismiss_stale_reviews": {
                    "type": "boolean"
                  },
                  "dismissal_allowances": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "pattern": {
                    "type": "string"
                  },
                  "push_allowances": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "repo_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "require_approvals": {
                    "type": "integer",
                    "format": "int32"
                  },
                  "require_code_owner_review": {
                    "type": "boolean"
                  },
                  "require_conversation_resolution": {
                    "type": "boolean"
                  },
                  "require_linear_history": {
                    "type": "boolean"
                  },
                  "require_signed_commits": {
                    "type": "boolean"
                  },
                  "require_status_checks": {
                    "type": "boolean"
                  },
                  "required_status_checks": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "restrict_pushes": {
                    "type": "boolean"
                  },
                  "restrict_review_dismissal": {
                    "type": "boolean"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            ]
          }
        }
      },
      "ApiResponse_PrAssignee": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "assignee_id",
              "created_at"
            ],
            "properties": {
              "assigned_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "assignee_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PrCheckRun": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "commit_sha",
              "name",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "commit_sha": {
                "type": "string"
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "conclusion": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Status"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "details_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrCommit": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "repo_id",
              "commit_sha",
              "position",
              "created_at"
            ],
            "properties": {
              "authored_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "commit_sha": {
                "type": "string"
              },
              "committed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "position": {
                "type": "integer",
                "format": "int32"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PrEvent": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "event_type",
              "created_at"
            ],
            "properties": {
              "actor_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "event_type": {
                "$ref": "#/components/schemas/EventType"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "metadata": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "new_value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "old_value": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PrFile": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "path",
              "status",
              "additions",
              "deletions",
              "changes",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "additions": {
                "type": "integer",
                "format": "int32"
              },
              "changes": {
                "type": "integer",
                "format": "int32"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deletions": {
                "type": "integer",
                "format": "int32"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "old_path": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "patch": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "path": {
                "type": "string"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrLabel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "name",
              "color",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrLabelRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "label_id",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "label_id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PrMergeStrategy": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "pull_request_id",
              "strategy",
              "auto_merge",
              "delete_source_branch",
              "merge_when_checks_pass",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "auto_merge": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "delete_source_branch": {
                "type": "boolean"
              },
              "merge_when_checks_pass": {
                "type": "boolean"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "selected_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "squash_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "squash_title": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "strategy": {
                "$ref": "#/components/schemas/MergeStrategyKind"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrReaction": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "user_id",
              "content",
              "target_type",
              "created_at"
            ],
            "properties": {
              "content": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "target_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_type": {
                "$ref": "#/components/schemas/TargetType"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PrReview": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "author_id",
              "state",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "commit_sha": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "dismiss_reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dismissed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dismissed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "type": "string"
              },
              "submitted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrReviewComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "review_id",
              "pull_request_id",
              "author_id",
              "body",
              "path",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "diff_hunk": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "edited_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "in_reply_to_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "line": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "original_line": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "original_start_line": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "path": {
                "type": "string"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "review_id": {
                "type": "string",
                "format": "uuid"
              },
              "start_line": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrReviewDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "author",
              "state",
              "dismissed",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "dismissed": {
                "type": "boolean"
              },
              "dismissed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "dismissed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrStatus": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "pull_request_id",
              "head_commit_sha",
              "checks_state",
              "mergeable_state",
              "conflicts",
              "approvals_count",
              "requested_reviews_count",
              "changed_files_count",
              "additions_count",
              "deletions_count",
              "updated_at"
            ],
            "properties": {
              "additions_count": {
                "type": "integer",
                "format": "int32"
              },
              "approvals_count": {
                "type": "integer",
                "format": "int32"
              },
              "changed_files_count": {
                "type": "integer",
                "format": "int32"
              },
              "checks_state": {
                "$ref": "#/components/schemas/State"
              },
              "conflicts": {
                "type": "boolean"
              },
              "deletions_count": {
                "type": "integer",
                "format": "int32"
              },
              "head_commit_sha": {
                "type": "string"
              },
              "mergeable_state": {
                "$ref": "#/components/schemas/State"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "requested_reviews_count": {
                "type": "integer",
                "format": "int32"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PrSubscription": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "pull_request_id",
              "user_id",
              "reason",
              "muted",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "muted": {
                "type": "boolean"
              },
              "pull_request_id": {
                "type": "string",
                "format": "uuid"
              },
              "reason": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_PullRequest": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "author_id",
              "number",
              "title",
              "state",
              "source_repo_id",
              "source_branch",
              "target_repo_id",
              "target_branch",
              "head_commit_sha",
              "draft",
              "locked",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "base_commit_sha": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "closed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "draft": {
                "type": "boolean"
              },
              "head_commit_sha": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "locked": {
                "type": "boolean"
              },
              "merge_commit_sha": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "merged_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "merged_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "number": {
                "type": "integer",
                "format": "int64"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "source_branch": {
                "type": "string"
              },
              "source_repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "target_branch": {
                "type": "string"
              },
              "target_repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_PullRequestDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "author",
              "number",
              "title",
              "state",
              "source_repo_id",
              "source_branch",
              "target_repo_id",
              "target_branch",
              "head_commit_sha",
              "draft",
              "locked",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "base_commit_sha": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "closed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "closed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "draft": {
                "type": "boolean"
              },
              "head_commit_sha": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "locked": {
                "type": "boolean"
              },
              "merge_commit_sha": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "merged_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "merged_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "number": {
                "type": "integer",
                "format": "int64"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "source_branch": {
                "type": "string"
              },
              "source_repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "target_branch": {
                "type": "string"
              },
              "target_repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RebaseResult": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "status",
              "conflicts"
            ],
            "properties": {
              "conflicts": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MergeConflict"
                }
              },
              "head": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Commit"
                  }
                ]
              },
              "status": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_Regenerate2FABackupCodesResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "backup_codes"
            ],
            "properties": {
              "backup_codes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Newly generated one-time backup codes. Old backup codes become invalid."
              }
            }
          }
        }
      },
      "ApiResponse_RegisterEmailCodeResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "expires_in_secs"
            ],
            "properties": {
              "expires_in_secs": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_RegisterResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "username"
            ],
            "properties": {
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Avatar URL; usually absent right after registration."
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Display name initialized from username."
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "description": "Newly created user id."
              },
              "username": {
                "type": "string",
                "description": "Unique username used for login and profile URL."
              }
            }
          }
        }
      },
      "ApiResponse_Repo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "owner_id",
              "name",
              "default_branch",
              "visibility",
              "status",
              "is_fork",
              "storage_node_ids",
              "primary_storage_node_id",
              "storage_path",
              "git_service",
              "created_at",
              "updated_at",
              "topics",
              "has_issues",
              "has_wiki",
              "has_pull_requests",
              "allow_forking",
              "allow_merge_commit",
              "allow_squash_merge",
              "allow_rebase_merge",
              "delete_branch_on_merge"
            ],
            "properties": {
              "allow_forking": {
                "type": "boolean"
              },
              "allow_merge_commit": {
                "type": "boolean"
              },
              "allow_rebase_merge": {
                "type": "boolean"
              },
              "allow_squash_merge": {
                "type": "boolean"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "default_branch": {
                "type": "string"
              },
              "delete_branch_on_merge": {
                "type": "boolean"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "forked_from_repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "git_service": {
                "$ref": "#/components/schemas/GitService"
              },
              "has_issues": {
                "type": "boolean"
              },
              "has_pull_requests": {
                "type": "boolean"
              },
              "has_wiki": {
                "type": "boolean"
              },
              "homepage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_fork": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "owner_id": {
                "type": "string",
                "format": "uuid"
              },
              "primary_storage_node_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "storage_node_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "storage_path": {
                "type": "string"
              },
              "topics": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_RepoBranch": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "name",
              "commit_sha",
              "protected",
              "default_branch",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "commit_sha": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "default_branch": {
                "type": "boolean"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_push_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_push_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "protected": {
                "type": "boolean"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RepoCommitComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "push_commit_id",
              "commit_sha",
              "author_id",
              "body",
              "resolved",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": "string"
              },
              "commit_sha": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "line": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "path": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "push_commit_id": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "resolved": {
                "type": "boolean"
              },
              "resolved_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "resolved_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RepoCommitStatus": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "push_commit_id",
              "latest_commit_sha",
              "context",
              "state",
              "reported_at",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "context": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "latest_commit_sha": {
                "type": "string"
              },
              "push_commit_id": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "reported_at": {
                "type": "string",
                "format": "date-time"
              },
              "reported_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "state": {
                "$ref": "#/components/schemas/State"
              },
              "target_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RepoDeployKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "title",
              "public_key",
              "fingerprint_sha256",
              "key_type",
              "read_only",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "fingerprint_sha256": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "key_type": {
                "$ref": "#/components/schemas/KeyType"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "public_key": {
                "type": "string"
              },
              "read_only": {
                "type": "boolean"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RepoDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace",
              "owner",
              "name",
              "default_branch",
              "visibility",
              "status",
              "is_fork",
              "storage_node_ids",
              "primary_storage_node_id",
              "storage_path",
              "git_service",
              "created_at",
              "updated_at",
              "topics",
              "has_issues",
              "has_wiki",
              "has_pull_requests",
              "allow_forking",
              "allow_merge_commit",
              "allow_squash_merge",
              "allow_rebase_merge",
              "delete_branch_on_merge"
            ],
            "properties": {
              "allow_forking": {
                "type": "boolean"
              },
              "allow_merge_commit": {
                "type": "boolean"
              },
              "allow_rebase_merge": {
                "type": "boolean"
              },
              "allow_squash_merge": {
                "type": "boolean"
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "default_branch": {
                "type": "string"
              },
              "delete_branch_on_merge": {
                "type": "boolean"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "forked_from_repo_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "git_service": {
                "$ref": "#/components/schemas/GitService"
              },
              "has_issues": {
                "type": "boolean"
              },
              "has_pull_requests": {
                "type": "boolean"
              },
              "has_wiki": {
                "type": "boolean"
              },
              "homepage": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_fork": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "owner": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "primary_storage_node_id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "storage_node_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "storage_path": {
                "type": "string"
              },
              "topics": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              },
              "workspace": {
                "$ref": "#/components/schemas/WorkspaceBaseInfo"
              }
            }
          }
        }
      },
      "ApiResponse_RepoFork": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "parent_repo_id",
              "fork_repo_id",
              "forked_by",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "fork_repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "forked_by": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "parent_repo_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_RepoInvitation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "email",
              "role",
              "token_hash",
              "invited_by",
              "expires_at",
              "created_at"
            ],
            "properties": {
              "accepted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "accepted_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "email": {
                "type": "string"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invited_by": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "token_hash": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_RepoMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "user_id",
              "role",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invited_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "joined_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_active_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_RepoRelease": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "tag_name",
              "title",
              "draft",
              "prerelease",
              "author_id",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "draft": {
                "type": "boolean"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "prerelease": {
                "type": "boolean"
              },
              "published_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "tag_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "tag_name": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_RepoStar": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "user_id",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_RepoStats": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "repo_id",
              "stars_count",
              "watchers_count",
              "forks_count",
              "branches_count",
              "tags_count",
              "commits_count",
              "releases_count",
              "open_issues_count",
              "open_pull_requests_count",
              "size_bytes",
              "updated_at"
            ],
            "properties": {
              "branches_count": {
                "type": "integer",
                "format": "int64"
              },
              "commits_count": {
                "type": "integer",
                "format": "int64"
              },
              "forks_count": {
                "type": "integer",
                "format": "int64"
              },
              "last_push_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "open_issues_count": {
                "type": "integer",
                "format": "int64"
              },
              "open_pull_requests_count": {
                "type": "integer",
                "format": "int64"
              },
              "releases_count": {
                "type": "integer",
                "format": "int64"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "size_bytes": {
                "type": "integer",
                "format": "int64"
              },
              "stars_count": {
                "type": "integer",
                "format": "int64"
              },
              "tags_count": {
                "type": "integer",
                "format": "int64"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "watchers_count": {
                "type": "integer",
                "format": "int64"
              }
            }
          }
        }
      },
      "ApiResponse_RepoTag": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "name",
              "target_commit_sha",
              "signed",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "signed": {
                "type": "boolean"
              },
              "tagger_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "target_commit_sha": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_RepoWatch": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "user_id",
              "level",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "level": {
                "$ref": "#/components/schemas/SubscriptionLevel"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_RepoWebhook": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "url",
              "events",
              "active",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "active": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EventType"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_delivery_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_delivery_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "secret_ciphertext": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "url": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_Repository": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "bare",
              "empty",
              "object_format",
              "default_branch",
              "git_object_directory",
              "git_alternate_object_directories"
            ],
            "properties": {
              "bare": {
                "type": "boolean"
              },
              "default_branch": {
                "type": "string"
              },
              "empty": {
                "type": "boolean"
              },
              "git_alternate_object_directories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "git_object_directory": {
                "type": "string"
              },
              "header": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RepositoryHeader"
                  }
                ]
              },
              "object_format": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_RepositoryHealthResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "ok",
              "warnings",
              "errors"
            ],
            "properties": {
              "errors": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "ok": {
                "type": "boolean"
              },
              "statistics": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RepositoryStatistics"
                  }
                ]
              },
              "warnings": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_RepositoryMaintenanceResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "ok",
              "stdout",
              "stderr"
            ],
            "properties": {
              "ok": {
                "type": "boolean"
              },
              "stderr": {
                "type": "string"
              },
              "stdout": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_RepositoryStatistics": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "size_bytes",
              "loose_object_count",
              "packed_object_count",
              "packfile_count",
              "reference_count",
              "commit_graph_size_bytes",
              "multi_pack_index_size_bytes"
            ],
            "properties": {
              "commit_graph_size_bytes": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "loose_object_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "multi_pack_index_size_bytes": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "packed_object_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "packfile_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "reference_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "size_bytes": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          }
        }
      },
      "ApiResponse_RsaResponse": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "public_key"
            ],
            "properties": {
              "public_key": {
                "type": "string"
              }
            }
          }
        }
      },
      "ApiResponse_String": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string"
          }
        }
      },
      "ApiResponse_Tag": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "name",
              "full_ref",
              "target_type",
              "annotated",
              "message",
              "raw"
            ],
            "properties": {
              "annotated": {
                "type": "boolean"
              },
              "full_ref": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "raw": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "format": "int32",
                  "minimum": 0
                }
              },
              "signature": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/VerifiedSignature"
                  }
                ]
              },
              "tag_oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "tagger": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Signature"
                  }
                ]
              },
              "target_oid": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Oid"
                  }
                ]
              },
              "target_type": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_User": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "username",
              "status",
              "role",
              "visibility",
              "is_active",
              "is_bot",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "bio": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "display_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_active": {
                "type": "boolean"
              },
              "is_bot": {
                "type": "boolean"
              },
              "last_login_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "restore_token_expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "restore_token_hash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "username": {
                "type": "string"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              }
            }
          }
        }
      },
      "ApiResponse_UserAppearance": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "user_id",
              "theme",
              "color_scheme",
              "density",
              "font_size",
              "markdown_preview",
              "reduced_motion",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "color_scheme": {
                "$ref": "#/components/schemas/ColorScheme"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "density": {
                "$ref": "#/components/schemas/Density"
              },
              "editor_theme": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "font_size": {
                "$ref": "#/components/schemas/FontSize"
              },
              "markdown_preview": {
                "type": "boolean"
              },
              "reduced_motion": {
                "type": "boolean"
              },
              "theme": {
                "$ref": "#/components/schemas/Theme"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_UserBlock": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "blocker_id",
              "blocked_id",
              "created_at"
            ],
            "properties": {
              "blocked_id": {
                "type": "string",
                "format": "uuid"
              },
              "blocker_id": {
                "type": "string",
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_UserDevice": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "device_name",
              "device_type",
              "trusted",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "device_name": {
                "type": "string"
              },
              "device_type": {
                "$ref": "#/components/schemas/DeviceType"
              },
              "fingerprint": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_seen_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "trusted": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_agent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_UserFollow": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "follower_id",
              "following_id",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "follower_id": {
                "type": "string",
                "format": "uuid"
              },
              "following_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_UserGpgKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "key_id",
              "public_key",
              "fingerprint",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "fingerprint": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "key_id": {
                "type": "string"
              },
              "primary_email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "public_key": {
                "type": "string"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "verified_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_UserNotifySetting": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "user_id",
              "email_notifications",
              "web_notifications",
              "mention_notifications",
              "review_notifications",
              "security_notifications",
              "marketing_emails",
              "digest_frequency",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "digest_frequency": {
                "$ref": "#/components/schemas/DigestFrequency"
              },
              "email_notifications": {
                "type": "boolean"
              },
              "marketing_emails": {
                "type": "boolean"
              },
              "mention_notifications": {
                "type": "boolean"
              },
              "review_notifications": {
                "type": "boolean"
              },
              "security_notifications": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "web_notifications": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "ApiResponse_UserOAuthInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "provider",
              "provider_user_id",
              "linked_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "linked_at": {
                "type": "string",
                "format": "date-time"
              },
              "provider": {
                "$ref": "#/components/schemas/Provider"
              },
              "provider_email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "provider_user_id": {
                "type": "string"
              },
              "provider_username": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "token_expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_UserPersonalAccessTokenInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "name",
              "scopes",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "name": {
                "type": "string"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Scope"
                }
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        }
      },
      "ApiResponse_UserPresence": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "status",
              "last_active_at",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "custom_status_emoji": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "custom_status_text": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "device_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeviceType"
                  }
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_active_at": {
                "type": "string",
                "format": "date-time"
              },
              "last_seen_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "status": {
                "$ref": "#/components/schemas/PresenceStatus"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_UserProfile": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "user_id",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "company": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "full_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "location": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_readme": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "timezone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "twitter_username": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "website_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_UserSecurityLog": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "event_type",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "event_type": {
                "$ref": "#/components/schemas/EventType"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "metadata": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/Value"
                  }
                ]
              },
              "user_agent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_UserSessionInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "last_active_at",
              "expires_at",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_active_at": {
                "type": "string",
                "format": "date-time"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "user_agent": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "ApiResponse_UserSshKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "user_id",
              "title",
              "public_key",
              "fingerprint_sha256",
              "key_type",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "fingerprint_sha256": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "key_type": {
                "$ref": "#/components/schemas/KeyType"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "public_key": {
                "type": "string"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_Vec_BranchProtectionRule": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "pattern",
                "require_approvals",
                "require_status_checks",
                "required_status_checks",
                "require_linear_history",
                "allow_force_pushes",
                "allow_deletions",
                "require_signed_commits",
                "require_code_owner_review",
                "dismiss_stale_reviews",
                "restrict_pushes",
                "push_allowances",
                "restrict_review_dismissal",
                "dismissal_allowances",
                "require_conversation_resolution",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "allow_deletions": {
                  "type": "boolean"
                },
                "allow_force_pushes": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "dismiss_stale_reviews": {
                  "type": "boolean"
                },
                "dismissal_allowances": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pattern": {
                  "type": "string"
                },
                "push_allowances": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "require_approvals": {
                  "type": "integer",
                  "format": "int32"
                },
                "require_code_owner_review": {
                  "type": "boolean"
                },
                "require_conversation_resolution": {
                  "type": "boolean"
                },
                "require_linear_history": {
                  "type": "boolean"
                },
                "require_signed_commits": {
                  "type": "boolean"
                },
                "require_status_checks": {
                  "type": "boolean"
                },
                "required_status_checks": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "restrict_pushes": {
                  "type": "boolean"
                },
                "restrict_review_dismissal": {
                  "type": "boolean"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_Channel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "created_by",
                "name",
                "channel_type",
                "channel_kind",
                "visibility",
                "nsfw",
                "archived",
                "read_only",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "available_tags": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "bitrate": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "category_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "channel_kind": {
                  "$ref": "#/components/schemas/ChannelKind"
                },
                "channel_type": {
                  "$ref": "#/components/schemas/ChannelType"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "default_auto_archive_duration": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "default_forum_layout": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ForumLayout"
                    }
                  ]
                },
                "default_reaction_emoji": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "default_sort_order": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ForumSortOrder"
                    }
                  ]
                },
                "default_thread_rate_limit": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_message_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_message_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "nsfw": {
                  "type": "boolean"
                },
                "parent_channel_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "position": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "rate_limit_per_user": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "read_only": {
                  "type": "boolean"
                },
                "repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "require_tag": {
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "rtc_region": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "topic": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_limit": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_ChannelCategory": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "name",
                "position",
                "collapsed",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "collapsed": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "position": {
                  "type": "integer",
                  "format": "int32"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_ChannelDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "creator",
                "name",
                "channel_type",
                "channel_kind",
                "visibility",
                "nsfw",
                "archived",
                "read_only",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived": {
                  "type": "boolean"
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "bitrate": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "category_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "channel_kind": {
                  "$ref": "#/components/schemas/ChannelKind"
                },
                "channel_type": {
                  "$ref": "#/components/schemas/ChannelType"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "creator": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_message_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_message_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "nsfw": {
                  "type": "boolean"
                },
                "parent_channel_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "position": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "read_only": {
                  "type": "boolean"
                },
                "repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "rtc_region": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "topic": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_limit": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_ChannelMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "channel_id",
                "user_id",
                "role",
                "status",
                "muted",
                "pinned",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "channel_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "joined_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_read_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_read_message_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "left_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "muted": {
                  "type": "boolean"
                },
                "pinned": {
                  "type": "boolean"
                },
                "role": {
                  "$ref": "#/components/schemas/Role"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_Issue": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "author_id",
                "number",
                "title",
                "state",
                "priority",
                "visibility",
                "locked",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "closed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "due_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "locked": {
                  "type": "boolean"
                },
                "milestone_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "format": "int64"
                },
                "priority": {
                  "$ref": "#/components/schemas/Priority"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueAssignee": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "assignee_id",
                "created_at"
              ],
              "properties": {
                "assigned_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "assignee_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "author_id",
                "body",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "edited_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reply_to_comment_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueCommentDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "author",
                "body",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "body": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reply_to_comment_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "author",
                "number",
                "title",
                "state",
                "priority",
                "visibility",
                "locked",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "closed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "due_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "locked": {
                  "type": "boolean"
                },
                "milestone_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "format": "int64"
                },
                "priority": {
                  "$ref": "#/components/schemas/Priority"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueEvent": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "event_type",
                "created_at"
              ],
              "properties": {
                "actor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "event_type": {
                  "$ref": "#/components/schemas/EventType"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "metadata": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "new_value": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "old_value": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueLabel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "name",
                "color",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "color": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueLabelRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "label_id",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueMilestone": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "title",
                "state",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "closed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "due_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssuePrRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "pull_request_id",
                "relation_type",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "relation_type": {
                  "$ref": "#/components/schemas/RelationType"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueReaction": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "user_id",
                "content",
                "target_type",
                "created_at"
              ],
              "properties": {
                "content": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "$ref": "#/components/schemas/TargetType"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueRepoRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "repo_id",
                "relation_type",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "relation_type": {
                  "$ref": "#/components/schemas/RelationType"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueSubscriber": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "issue_id",
                "user_id",
                "reason",
                "muted",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "muted": {
                  "type": "boolean"
                },
                "reason": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_IssueTemplate": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "name",
                "body_template",
                "labels",
                "active",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "body_template": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "name": {
                  "type": "string"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title_template": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_Notification": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "notification_type",
                "title",
                "priority",
                "metadata",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "action_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "actor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "channel_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "dismissed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "message_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "metadata": {},
                "notification_type": {
                  "$ref": "#/components/schemas/NotificationType"
                },
                "priority": {
                  "$ref": "#/components/schemas/Priority"
                },
                "pull_request_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "read_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/TargetType"
                    }
                  ]
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_NotificationBlock": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "target_type",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "channel": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/DeliveryChannel"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "notification_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/NotificationType"
                    }
                  ]
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "$ref": "#/components/schemas/TargetType"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_NotificationDelivery": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "notification_id",
                "user_id",
                "channel",
                "status",
                "attempts",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "attempts": {
                  "type": "integer",
                  "format": "int32"
                },
                "channel": {
                  "$ref": "#/components/schemas/DeliveryChannel"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivered_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "destination": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "failed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_error": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notification_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "provider": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Provider"
                    }
                  ]
                },
                "provider_message_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scheduled_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "sent_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_NotificationDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "notification_type",
                "title",
                "priority",
                "metadata",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "action_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "actor": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/UserBaseInfo"
                    }
                  ]
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "channel_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "dismissed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "issue_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "message_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "metadata": {},
                "notification_type": {
                  "$ref": "#/components/schemas/NotificationType"
                },
                "priority": {
                  "$ref": "#/components/schemas/Priority"
                },
                "pull_request_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "read_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "repo": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/RepoBaseInfo"
                    }
                  ]
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/TargetType"
                    }
                  ]
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "workspace": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/WorkspaceBaseInfo"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_NotificationSubscription": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "target_type",
                "event_types",
                "channels",
                "level",
                "muted",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "channels": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "event_types": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventType"
                  }
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "level": {
                  "$ref": "#/components/schemas/SubscriptionLevel"
                },
                "muted": {
                  "type": "boolean"
                },
                "muted_until": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "$ref": "#/components/schemas/TargetType"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "workspace_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_NotificationTemplate": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "key",
                "notification_type",
                "channel",
                "locale",
                "title_template",
                "body_template",
                "enabled",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "action_text_template": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "body_template": {
                  "type": "string"
                },
                "channel": {
                  "$ref": "#/components/schemas/DeliveryChannel"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "enabled": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key": {
                  "type": "string"
                },
                "locale": {
                  "type": "string"
                },
                "notification_type": {
                  "$ref": "#/components/schemas/NotificationType"
                },
                "subject_template": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "title_template": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrAssignee": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "assignee_id",
                "created_at"
              ],
              "properties": {
                "assigned_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "assignee_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrCheckRun": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "commit_sha",
                "name",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "commit_sha": {
                  "type": "string"
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "conclusion": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Status"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "details_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "external_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "started_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrCommit": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "repo_id",
                "commit_sha",
                "position",
                "created_at"
              ],
              "properties": {
                "authored_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "commit_sha": {
                  "type": "string"
                },
                "committed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "position": {
                  "type": "integer",
                  "format": "int32"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrEvent": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "event_type",
                "created_at"
              ],
              "properties": {
                "actor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "event_type": {
                  "$ref": "#/components/schemas/EventType"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "metadata": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "new_value": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "old_value": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrFile": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "path",
                "status",
                "additions",
                "deletions",
                "changes",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "additions": {
                  "type": "integer",
                  "format": "int32"
                },
                "changes": {
                  "type": "integer",
                  "format": "int32"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deletions": {
                  "type": "integer",
                  "format": "int32"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "old_path": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "patch": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "path": {
                  "type": "string"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrLabel": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "name",
                "color",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "color": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrLabelRelation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "label_id",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrReaction": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "user_id",
                "content",
                "target_type",
                "created_at"
              ],
              "properties": {
                "content": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "$ref": "#/components/schemas/TargetType"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrReview": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "author_id",
                "state",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "commit_sha": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "dismiss_reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dismissed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "dismissed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "submitted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrReviewComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "review_id",
                "pull_request_id",
                "author_id",
                "body",
                "path",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "diff_hunk": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "edited_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "in_reply_to_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "line": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "original_line": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "original_start_line": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "path": {
                  "type": "string"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "review_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "start_line": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrReviewDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "author",
                "state",
                "dismissed",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "dismissed": {
                  "type": "boolean"
                },
                "dismissed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "dismissed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PrSubscription": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "pull_request_id",
                "user_id",
                "reason",
                "muted",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "muted": {
                  "type": "boolean"
                },
                "pull_request_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reason": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PullRequest": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "author_id",
                "number",
                "title",
                "state",
                "source_repo_id",
                "source_branch",
                "target_repo_id",
                "target_branch",
                "head_commit_sha",
                "draft",
                "locked",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "base_commit_sha": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "closed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "draft": {
                  "type": "boolean"
                },
                "head_commit_sha": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "locked": {
                  "type": "boolean"
                },
                "merge_commit_sha": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "merged_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "merged_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "format": "int64"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_branch": {
                  "type": "string"
                },
                "source_repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "target_branch": {
                  "type": "string"
                },
                "target_repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_PullRequestDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "author",
                "number",
                "title",
                "state",
                "source_repo_id",
                "source_branch",
                "target_repo_id",
                "target_branch",
                "head_commit_sha",
                "draft",
                "locked",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "base_commit_sha": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "closed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "closed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "draft": {
                  "type": "boolean"
                },
                "head_commit_sha": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "locked": {
                  "type": "boolean"
                },
                "merge_commit_sha": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "merged_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "merged_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "number": {
                  "type": "integer",
                  "format": "int64"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "source_branch": {
                  "type": "string"
                },
                "source_repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "target_branch": {
                  "type": "string"
                },
                "target_repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_Repo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "owner_id",
                "name",
                "default_branch",
                "visibility",
                "status",
                "is_fork",
                "storage_node_ids",
                "primary_storage_node_id",
                "storage_path",
                "git_service",
                "created_at",
                "updated_at",
                "topics",
                "has_issues",
                "has_wiki",
                "has_pull_requests",
                "allow_forking",
                "allow_merge_commit",
                "allow_squash_merge",
                "allow_rebase_merge",
                "delete_branch_on_merge"
              ],
              "properties": {
                "allow_forking": {
                  "type": "boolean"
                },
                "allow_merge_commit": {
                  "type": "boolean"
                },
                "allow_rebase_merge": {
                  "type": "boolean"
                },
                "allow_squash_merge": {
                  "type": "boolean"
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "default_branch": {
                  "type": "string"
                },
                "delete_branch_on_merge": {
                  "type": "boolean"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "forked_from_repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "git_service": {
                  "$ref": "#/components/schemas/GitService"
                },
                "has_issues": {
                  "type": "boolean"
                },
                "has_pull_requests": {
                  "type": "boolean"
                },
                "has_wiki": {
                  "type": "boolean"
                },
                "homepage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_fork": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "owner_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "primary_storage_node_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "storage_node_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "storage_path": {
                  "type": "string"
                },
                "topics": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoBranch": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "name",
                "commit_sha",
                "protected",
                "default_branch",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "commit_sha": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "default_branch": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_push_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_push_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "protected": {
                  "type": "boolean"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoCommitComment": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "push_commit_id",
                "commit_sha",
                "author_id",
                "body",
                "resolved",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": "string"
                },
                "commit_sha": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "line": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "path": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "push_commit_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "resolved": {
                  "type": "boolean"
                },
                "resolved_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "resolved_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoCommitStatus": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "push_commit_id",
                "latest_commit_sha",
                "context",
                "state",
                "reported_at",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "context": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "latest_commit_sha": {
                  "type": "string"
                },
                "push_commit_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reported_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "reported_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "state": {
                  "$ref": "#/components/schemas/State"
                },
                "target_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoDeployKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "title",
                "public_key",
                "fingerprint_sha256",
                "key_type",
                "read_only",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "fingerprint_sha256": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key_type": {
                  "$ref": "#/components/schemas/KeyType"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "public_key": {
                  "type": "string"
                },
                "read_only": {
                  "type": "boolean"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace",
                "owner",
                "name",
                "default_branch",
                "visibility",
                "status",
                "is_fork",
                "storage_node_ids",
                "primary_storage_node_id",
                "storage_path",
                "git_service",
                "created_at",
                "updated_at",
                "topics",
                "has_issues",
                "has_wiki",
                "has_pull_requests",
                "allow_forking",
                "allow_merge_commit",
                "allow_squash_merge",
                "allow_rebase_merge",
                "delete_branch_on_merge"
              ],
              "properties": {
                "allow_forking": {
                  "type": "boolean"
                },
                "allow_merge_commit": {
                  "type": "boolean"
                },
                "allow_rebase_merge": {
                  "type": "boolean"
                },
                "allow_squash_merge": {
                  "type": "boolean"
                },
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "default_branch": {
                  "type": "string"
                },
                "delete_branch_on_merge": {
                  "type": "boolean"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "forked_from_repo_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "git_service": {
                  "$ref": "#/components/schemas/GitService"
                },
                "has_issues": {
                  "type": "boolean"
                },
                "has_pull_requests": {
                  "type": "boolean"
                },
                "has_wiki": {
                  "type": "boolean"
                },
                "homepage": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_fork": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "owner": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "primary_storage_node_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "storage_node_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "storage_path": {
                  "type": "string"
                },
                "topics": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                },
                "workspace": {
                  "$ref": "#/components/schemas/WorkspaceBaseInfo"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoFork": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "parent_repo_id",
                "fork_repo_id",
                "forked_by",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "fork_repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "forked_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "parent_repo_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoInvitation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "email",
                "role",
                "token_hash",
                "invited_by",
                "expires_at",
                "created_at"
              ],
              "properties": {
                "accepted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "accepted_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "email": {
                  "type": "string"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "invited_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "role": {
                  "$ref": "#/components/schemas/Role"
                },
                "token_hash": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "user_id",
                "role",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "invited_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "joined_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_active_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "$ref": "#/components/schemas/Role"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoRelease": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "tag_name",
                "title",
                "draft",
                "prerelease",
                "author_id",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "draft": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "prerelease": {
                  "type": "boolean"
                },
                "published_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "tag_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "tag_name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoStar": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "user_id",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoTag": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "name",
                "target_commit_sha",
                "signed",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "signed": {
                  "type": "boolean"
                },
                "tagger_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_commit_sha": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoWatch": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "user_id",
                "level",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "level": {
                  "$ref": "#/components/schemas/SubscriptionLevel"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_RepoWebhook": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "url",
                "events",
                "active",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "events": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventType"
                  }
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_delivery_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_delivery_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "secret_ciphertext": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserBlock": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "blocker_id",
                "blocked_id",
                "created_at"
              ],
              "properties": {
                "blocked_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "blocker_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserDevice": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "device_name",
                "device_type",
                "trusted",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "device_name": {
                  "type": "string"
                },
                "device_type": {
                  "$ref": "#/components/schemas/DeviceType"
                },
                "fingerprint": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_seen_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "trusted": {
                  "type": "boolean"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserFollow": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "follower_id",
                "following_id",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "follower_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "following_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserGpgKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "key_id",
                "public_key",
                "fingerprint",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "fingerprint": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key_id": {
                  "type": "string"
                },
                "primary_email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "public_key": {
                  "type": "string"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "verified_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserOAuthInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "provider",
                "provider_user_id",
                "linked_at"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "linked_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "provider": {
                  "$ref": "#/components/schemas/Provider"
                },
                "provider_email": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "provider_user_id": {
                  "type": "string"
                },
                "provider_username": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "token_expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserPersonalAccessTokenInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "scopes",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "name": {
                  "type": "string"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Scope"
                  }
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserSecurityLog": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "event_type",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "event_type": {
                  "$ref": "#/components/schemas/EventType"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "metadata": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserSessionInfo": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "last_active_at",
                "expires_at",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "last_active_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_UserSshKey": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "user_id",
                "title",
                "public_key",
                "fingerprint_sha256",
                "key_type",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "fingerprint_sha256": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key_type": {
                  "$ref": "#/components/schemas/KeyType"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "public_key": {
                  "type": "string"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WikiPage": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "repo_id",
                "slug",
                "title",
                "content",
                "author_id",
                "version",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "author_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "content": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_editor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "repo_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "slug": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "version": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WikiPageRevision": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "page_id",
                "version",
                "title",
                "content",
                "editor_id",
                "created_at"
              ],
              "properties": {
                "commit_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "content": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "editor_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "page_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "title": {
                  "type": "string"
                },
                "version": {
                  "type": "integer",
                  "format": "int32"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_Workspace": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "owner_id",
                "name",
                "visibility",
                "plan",
                "status",
                "default_role",
                "is_personal",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "avatar_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "default_role": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_personal": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "owner_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "plan": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceAuditLog": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "action",
                "created_at"
              ],
              "properties": {
                "action": {
                  "type": "string"
                },
                "actor_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "metadata": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/Value"
                    }
                  ]
                },
                "target_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "target_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/TargetType"
                    }
                  ]
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "owner",
                "name",
                "visibility",
                "plan",
                "status",
                "default_role",
                "is_personal",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "archived_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "avatar_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "default_role": {
                  "type": "string"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_personal": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "owner": {
                  "$ref": "#/components/schemas/UserBaseInfo"
                },
                "plan": {
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "visibility": {
                  "$ref": "#/components/schemas/Visibility"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceDomain": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "domain",
                "is_primary",
                "is_verified",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "domain": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_primary": {
                  "type": "boolean"
                },
                "is_verified": {
                  "type": "boolean"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "verification_token_hash": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "verified_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceIntegration": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "provider",
                "name",
                "config",
                "enabled",
                "installed_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "config": {},
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "enabled": {
                  "type": "boolean"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "installed_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "name": {
                  "type": "string"
                },
                "provider": {
                  "$ref": "#/components/schemas/Provider"
                },
                "secret_ciphertext": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceInvitation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "email",
                "role",
                "token_hash",
                "invited_by",
                "expires_at",
                "created_at"
              ],
              "properties": {
                "accepted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "accepted_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "email": {
                  "type": "string"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "invited_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "role": {
                  "$ref": "#/components/schemas/Role"
                },
                "token_hash": {
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "user_id",
                "role",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "invited_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "joined_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_active_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "role": {
                  "$ref": "#/components/schemas/Role"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspacePendingApproval": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "requester_id",
                "request_type",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "request_type": {
                  "$ref": "#/components/schemas/RequestType"
                },
                "requester_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "reviewed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "reviewed_by": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "status": {
                  "$ref": "#/components/schemas/Status"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_Vec_WorkspaceWebhook": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "workspace_id",
                "url",
                "events",
                "active",
                "created_by",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "events": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EventType"
                  }
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "last_delivery_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "last_delivery_status": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "secret_ciphertext": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "url": {
                  "type": "string"
                },
                "workspace_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          }
        }
      },
      "ApiResponse_WikiCompareResult": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Result of comparing two wiki page revisions",
            "required": [
              "old",
              "new"
            ],
            "properties": {
              "new": {
                "$ref": "#/components/schemas/WikiPageRevision",
                "description": "The newer revision being compared"
              },
              "old": {
                "$ref": "#/components/schemas/WikiPageRevision",
                "description": "The older revision being compared"
              }
            }
          }
        }
      },
      "ApiResponse_WikiPage": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "repo_id",
              "slug",
              "title",
              "content",
              "author_id",
              "version",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "author_id": {
                "type": "string",
                "format": "uuid"
              },
              "content": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_editor_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "repo_id": {
                "type": "string",
                "format": "uuid"
              },
              "slug": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "version": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_WikiPageRevision": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "page_id",
              "version",
              "title",
              "content",
              "editor_id",
              "created_at"
            ],
            "properties": {
              "commit_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "content": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "editor_id": {
                "type": "string",
                "format": "uuid"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "page_id": {
                "type": "string",
                "format": "uuid"
              },
              "title": {
                "type": "string"
              },
              "version": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        }
      },
      "ApiResponse_Workspace": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "owner_id",
              "name",
              "visibility",
              "plan",
              "status",
              "default_role",
              "is_personal",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "default_role": {
                "type": "string"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_personal": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "owner_id": {
                "type": "string",
                "format": "uuid"
              },
              "plan": {
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceBilling": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workspace_id",
              "plan",
              "status",
              "seats",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "billing_email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "canceled_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "current_period_end": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "current_period_start": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "plan": {
                "type": "string"
              },
              "seats": {
                "type": "integer",
                "format": "int32"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "subscription_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "trial_ends_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceCustomBranding": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workspace_id",
              "enabled",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "accent_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "custom_css": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": "boolean"
              },
              "favicon_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "primary_color": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "support_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceDetail": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "owner",
              "name",
              "visibility",
              "plan",
              "status",
              "default_role",
              "is_personal",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "default_role": {
                "type": "string"
              },
              "deleted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_personal": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "owner": {
                "$ref": "#/components/schemas/UserBaseInfo"
              },
              "plan": {
                "type": "string"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceDomain": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "domain",
              "is_primary",
              "is_verified",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "domain": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_primary": {
                "type": "boolean"
              },
              "is_verified": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "verification_token_hash": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "verified_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceIntegration": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "provider",
              "name",
              "config",
              "enabled",
              "installed_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "config": {},
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "enabled": {
                "type": "boolean"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "installed_by": {
                "type": "string",
                "format": "uuid"
              },
              "last_used_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "name": {
                "type": "string"
              },
              "provider": {
                "$ref": "#/components/schemas/Provider"
              },
              "secret_ciphertext": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceInvitation": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "email",
              "role",
              "token_hash",
              "invited_by",
              "expires_at",
              "created_at"
            ],
            "properties": {
              "accepted_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "accepted_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "email": {
                "type": "string"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invited_by": {
                "type": "string",
                "format": "uuid"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "token_hash": {
                "type": "string"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceMember": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "user_id",
              "role",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invited_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "joined_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_active_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "role": {
                "$ref": "#/components/schemas/Role"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspacePendingApproval": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "requester_id",
              "request_type",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "request_type": {
                "$ref": "#/components/schemas/RequestType"
              },
              "requester_id": {
                "type": "string",
                "format": "uuid"
              },
              "reviewed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "reviewed_by": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "status": {
                "$ref": "#/components/schemas/Status"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceSettings": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workspace_id",
              "allow_public_repos",
              "allow_member_invites",
              "require_two_factor",
              "default_repo_visibility",
              "default_branch_name",
              "issue_tracking_enabled",
              "pull_requests_enabled",
              "wiki_enabled",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "allow_member_invites": {
                "type": "boolean"
              },
              "allow_public_repos": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "default_branch_name": {
                "type": "string"
              },
              "default_repo_visibility": {
                "type": "string"
              },
              "issue_tracking_enabled": {
                "type": "boolean"
              },
              "pull_requests_enabled": {
                "type": "boolean"
              },
              "require_two_factor": {
                "type": "boolean"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "wiki_enabled": {
                "type": "boolean"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceStats": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "workspace_id",
              "members_count",
              "repos_count",
              "issues_count",
              "pull_requests_count",
              "storage_bytes",
              "bandwidth_bytes",
              "build_minutes_used",
              "updated_at"
            ],
            "properties": {
              "bandwidth_bytes": {
                "type": "integer",
                "format": "int64"
              },
              "build_minutes_used": {
                "type": "integer",
                "format": "int64"
              },
              "issues_count": {
                "type": "integer",
                "format": "int64"
              },
              "last_activity_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "members_count": {
                "type": "integer",
                "format": "int64"
              },
              "pull_requests_count": {
                "type": "integer",
                "format": "int64"
              },
              "repos_count": {
                "type": "integer",
                "format": "int64"
              },
              "storage_bytes": {
                "type": "integer",
                "format": "int64"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_WorkspaceWebhook": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "workspace_id",
              "url",
              "events",
              "active",
              "created_by",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "active": {
                "type": "boolean"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/EventType"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "last_delivery_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "last_delivery_status": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "secret_ciphertext": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "url": {
                "type": "string"
              },
              "workspace_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          }
        }
      },
      "ApiResponse_bool": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "boolean"
          }
        }
      },
      "ApiResponse_i64": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AvatarData": {
        "type": "object",
        "required": [
          "avatar_url",
          "storage_key"
        ],
        "properties": {
          "avatar_url": {
            "type": "string"
          },
          "storage_key": {
            "type": "string"
          }
        }
      },
      "BlameHunk": {
        "type": "object",
        "required": [
          "original_path",
          "final_path",
          "original_start_line",
          "final_start_line",
          "line_count",
          "boundary",
          "lines"
        ],
        "properties": {
          "boundary": {
            "type": "boolean"
          },
          "commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Commit"
              }
            ]
          },
          "final_path": {
            "type": "string"
          },
          "final_start_line": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "line_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlameLine"
            }
          },
          "original_path": {
            "type": "string"
          },
          "original_start_line": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "BlameLine": {
        "type": "object",
        "required": [
          "final_line",
          "original_line",
          "content"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "final_line": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "original_line": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "BlameResponse": {
        "type": "object",
        "required": [
          "hunks",
          "truncated"
        ],
        "properties": {
          "hunks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BlameHunk"
            }
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "Blob": {
        "type": "object",
        "required": [
          "path",
          "mode",
          "size",
          "data",
          "encoding",
          "binary",
          "truncated",
          "is_lfs"
        ],
        "properties": {
          "binary": {
            "type": "boolean"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "encoding": {
            "type": "string"
          },
          "is_lfs": {
            "type": "boolean"
          },
          "mode": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "recent_commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecentCommit"
              }
            ]
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "BlockBody": {
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional reason for blocking"
          }
        }
      },
      "Branch": {
        "type": "object",
        "required": [
          "name",
          "full_ref",
          "is_default",
          "is_head",
          "is_merged",
          "is_detached"
        ],
        "properties": {
          "commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Commit"
              }
            ]
          },
          "full_ref": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "is_detached": {
            "type": "boolean"
          },
          "is_head": {
            "type": "boolean"
          },
          "is_merged": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "target_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "upstream": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/BranchUpstream"
              }
            ]
          }
        }
      },
      "BranchMergeCheck": {
        "type": "object",
        "required": [
          "allowed",
          "reasons"
        ],
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BranchProtectionRule": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "pattern",
          "require_approvals",
          "require_status_checks",
          "required_status_checks",
          "require_linear_history",
          "allow_force_pushes",
          "allow_deletions",
          "require_signed_commits",
          "require_code_owner_review",
          "dismiss_stale_reviews",
          "restrict_pushes",
          "push_allowances",
          "restrict_review_dismissal",
          "dismissal_allowances",
          "require_conversation_resolution",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "allow_deletions": {
            "type": "boolean"
          },
          "allow_force_pushes": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "dismiss_stale_reviews": {
            "type": "boolean"
          },
          "dismissal_allowances": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pattern": {
            "type": "string"
          },
          "push_allowances": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "require_approvals": {
            "type": "integer",
            "format": "int32"
          },
          "require_code_owner_review": {
            "type": "boolean"
          },
          "require_conversation_resolution": {
            "type": "boolean"
          },
          "require_linear_history": {
            "type": "boolean"
          },
          "require_signed_commits": {
            "type": "boolean"
          },
          "require_status_checks": {
            "type": "boolean"
          },
          "required_status_checks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "restrict_pushes": {
            "type": "boolean"
          },
          "restrict_review_dismissal": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BranchUpstream": {
        "type": "object",
        "required": [
          "remote_name",
          "remote_url",
          "remote_branch_name",
          "local_branch_name"
        ],
        "properties": {
          "local_branch_name": {
            "type": "string"
          },
          "remote_branch_name": {
            "type": "string"
          },
          "remote_name": {
            "type": "string"
          },
          "remote_url": {
            "type": "string"
          }
        }
      },
      "CaptchaQuery": {
        "type": "object",
        "required": [
          "w",
          "h",
          "dark",
          "rsa"
        ],
        "properties": {
          "dark": {
            "type": "boolean"
          },
          "h": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "rsa": {
            "type": "boolean"
          },
          "w": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CaptchaResponse": {
        "type": "object",
        "required": [
          "base64",
          "req"
        ],
        "properties": {
          "base64": {
            "type": "string"
          },
          "req": {
            "$ref": "#/components/schemas/CaptchaQuery"
          },
          "rsa": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RsaResponse"
              }
            ]
          }
        }
      },
      "ChangePasswordParams": {
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "properties": {
          "current_password": {
            "type": "string"
          },
          "new_password": {
            "type": "string"
          }
        }
      },
      "Channel": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "created_by",
          "name",
          "channel_type",
          "channel_kind",
          "visibility",
          "nsfw",
          "archived",
          "read_only",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "available_tags": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "bitrate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "channel_kind": {
            "$ref": "#/components/schemas/ChannelKind"
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "default_auto_archive_duration": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "default_forum_layout": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ForumLayout"
              }
            ]
          },
          "default_reaction_emoji": {
            "type": [
              "string",
              "null"
            ]
          },
          "default_sort_order": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ForumSortOrder"
              }
            ]
          },
          "default_thread_rate_limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "nsfw": {
            "type": "boolean"
          },
          "parent_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rate_limit_per_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "read_only": {
            "type": "boolean"
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "require_tag": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "rtc_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "channel_type",
          "workspace_id",
          "archived"
        ],
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelCategory": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "name",
          "position",
          "collapsed",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "collapsed": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelDetail": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "creator",
          "name",
          "channel_type",
          "channel_kind",
          "visibility",
          "nsfw",
          "archived",
          "read_only",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "bitrate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "channel_kind": {
            "$ref": "#/components/schemas/ChannelKind"
          },
          "channel_type": {
            "$ref": "#/components/schemas/ChannelType"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "creator": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "nsfw": {
            "type": "boolean"
          },
          "parent_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "read_only": {
            "type": "boolean"
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rtc_region": {
            "type": [
              "string",
              "null"
            ]
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelKind": {
        "type": "string",
        "enum": [
          "Text",
          "Voice",
          "Stage",
          "Forum",
          "Announcement",
          "Unknown"
        ]
      },
      "ChannelListFilters": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "channel_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ChannelMember": {
        "type": "object",
        "required": [
          "id",
          "channel_id",
          "user_id",
          "role",
          "status",
          "muted",
          "pinned",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "channel_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "joined_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_read_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_read_message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "left_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "muted": {
            "type": "boolean"
          },
          "pinned": {
            "type": "boolean"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ChannelType": {
        "type": "string",
        "enum": [
          "Public",
          "Private",
          "Direct",
          "Group",
          "Repo",
          "System",
          "Unknown"
        ]
      },
      "CherryPickParams": {
        "type": "object",
        "required": [
          "commit",
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "mainline": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ColorScheme": {
        "type": "string",
        "enum": [
          "System",
          "Light",
          "Dark",
          "HighContrast",
          "Unknown"
        ]
      },
      "Commit": {
        "type": "object",
        "required": [
          "abbreviated_oid",
          "parent_oids",
          "subject",
          "body",
          "message",
          "trailers",
          "raw"
        ],
        "properties": {
          "abbreviated_oid": {
            "type": "string"
          },
          "author": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Signature"
              }
            ]
          },
          "authored_at": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ]
          },
          "body": {
            "type": "string"
          },
          "committed_at": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ]
          },
          "committer": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Signature"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "parent_oids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Oid"
            }
          },
          "raw": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "signature": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VerifiedSignature"
              }
            ]
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CommitStats"
              }
            ]
          },
          "subject": {
            "type": "string"
          },
          "trailers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitTrailer"
            }
          },
          "tree_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          }
        }
      },
      "CommitAction": {
        "type": "object",
        "required": [
          "action",
          "file_path"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "executable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "file_path": {
            "type": "string"
          },
          "previous_path": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CommitStats": {
        "type": "object",
        "required": [
          "additions",
          "deletions",
          "changed_files"
        ],
        "properties": {
          "additions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "changed_files": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "deletions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CommitTrailer": {
        "type": "object",
        "required": [
          "key",
          "value",
          "separator_present"
        ],
        "properties": {
          "key": {
            "type": "string"
          },
          "separator_present": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "CompareCommitsResponse": {
        "type": "object",
        "required": [
          "commits"
        ],
        "properties": {
          "commits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Commit"
            }
          },
          "merge_base": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CommitStats"
              }
            ]
          }
        }
      },
      "ContextMe": {
        "type": "object",
        "required": [
          "id",
          "username",
          "has_unread_notifications",
          "language",
          "timezone"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_unread_notifications": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "language": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "CreateBlockParams": {
        "type": "object",
        "required": [
          "target_type"
        ],
        "properties": {
          "channel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeliveryChannel"
              }
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "notification_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationType"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateBranchBody": {
        "type": "object",
        "required": [
          "branch_name",
          "start_point"
        ],
        "properties": {
          "branch_name": {
            "type": "string"
          },
          "start_point": {
            "type": "string"
          }
        }
      },
      "CreateBranchParams": {
        "type": "object",
        "required": [
          "name",
          "commit_sha"
        ],
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateCategoryParams": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "CreateChannelParams": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "channel_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "nsfw": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "parent_channel_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "rate_limit_per_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateCheckRunParams": {
        "type": "object",
        "required": [
          "commit_sha",
          "name",
          "status"
        ],
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "conclusion": {
            "type": [
              "string",
              "null"
            ]
          },
          "details_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "CreateCommentParams": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "reply_to_comment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateCommitCommentParams": {
        "type": "object",
        "required": [
          "push_commit_id",
          "commit_sha",
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "commit_sha": {
            "type": "string"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "push_commit_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "CreateCommitParams": {
        "type": "object",
        "required": [
          "branch",
          "message",
          "actions"
        ],
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommitAction"
            }
          },
          "branch": {
            "type": "string"
          },
          "force": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "message": {
            "type": "string"
          },
          "start_revision": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateCommitResponse": {
        "type": "object",
        "required": [
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Commit"
              }
            ]
          }
        }
      },
      "CreateCommitStatusParams": {
        "type": "object",
        "required": [
          "push_commit_id",
          "latest_commit_sha",
          "context",
          "state"
        ],
        "properties": {
          "context": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "latest_commit_sha": {
            "type": "string"
          },
          "push_commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "target_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateIntegrationParams": {
        "type": "object",
        "required": [
          "provider",
          "name"
        ],
        "properties": {
          "config": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WorkspaceIntegrationConfig"
              }
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateInvitationParams": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateInvitationResponse": {
        "type": "object",
        "required": [
          "invitation"
        ],
        "properties": {
          "invitation": {
            "$ref": "#/components/schemas/WorkspaceInvitation"
          }
        }
      },
      "CreateIssueParams": {
        "type": "object",
        "required": [
          "title",
          "repo_ids",
          "label_ids",
          "assignee_ids"
        ],
        "properties": {
          "assignee_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "label_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "milestone_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "repo_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "title": {
            "type": "string"
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateIssueReactionParams": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateLabelParams": {
        "type": "object",
        "required": [
          "name",
          "color"
        ],
        "properties": {
          "color": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateMilestoneParams": {
        "type": "object",
        "required": [
          "title"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "CreatePersonalAccessTokenResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "scopes",
          "token",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scope"
            }
          },
          "token": {
            "type": "string"
          }
        }
      },
      "CreatePrLabelParams": {
        "type": "object",
        "required": [
          "name",
          "color"
        ],
        "properties": {
          "color": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreatePrParams": {
        "type": "object",
        "required": [
          "title",
          "source_repo_id",
          "source_branch",
          "target_branch",
          "head_commit_sha"
        ],
        "properties": {
          "base_commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "head_commit_sha": {
            "type": "string"
          },
          "source_branch": {
            "type": "string"
          },
          "source_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_branch": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "CreateProtectionRuleParams": {
        "type": "object",
        "required": [
          "pattern"
        ],
        "properties": {
          "allow_deletions": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_force_pushes": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dismiss_stale_reviews": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dismissal_allowances": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "pattern": {
            "type": "string"
          },
          "push_allowances": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "require_approvals": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "require_code_owner_review": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_conversation_resolution": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_linear_history": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_signed_commits": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_status_checks": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "required_status_checks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "restrict_pushes": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "restrict_review_dismissal": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "CreateReactionParams": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateReleaseParams": {
        "type": "object",
        "required": [
          "tag_name",
          "title"
        ],
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "prerelease": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "tag_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "tag_name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "CreateRepoInvitationParams": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateRepoParams": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "allow_merge_commit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_rebase_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_squash_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "default_branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "delete_branch_on_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "git_service": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_issues": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "has_pull_requests": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "has_wiki": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "homepage": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "storage_node_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "storage_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "topics": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateReviewParams": {
        "type": "object",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "comments": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/ReviewCommentParams"
            }
          },
          "commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateSubscriptionParams": {
        "type": "object",
        "required": [
          "target_type",
          "event_types",
          "channels",
          "level"
        ],
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "event_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "level": {
            "$ref": "#/components/schemas/SubscriptionLevel"
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateTagBody": {
        "type": "object",
        "required": [
          "tag_name",
          "target"
        ],
        "properties": {
          "annotated": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "tag_name": {
            "type": "string"
          },
          "target": {
            "type": "string"
          }
        }
      },
      "CreateTagParams": {
        "type": "object",
        "required": [
          "name",
          "target_commit_sha"
        ],
        "properties": {
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "target_commit_sha": {
            "type": "string"
          }
        }
      },
      "CreateTemplateParams": {
        "type": "object",
        "required": [
          "key",
          "notification_type",
          "channel",
          "locale",
          "title_template",
          "body_template",
          "enabled"
        ],
        "properties": {
          "action_text_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "body_template": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/DeliveryChannel"
          },
          "enabled": {
            "type": "boolean"
          },
          "key": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "notification_type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "subject_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "title_template": {
            "type": "string"
          }
        }
      },
      "CreateTokenBody": {
        "type": "object",
        "required": [
          "name",
          "scopes"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional expiration date (UTC). If not set, the token never expires."
          },
          "name": {
            "type": "string",
            "description": "Display name for the token (e.g., \"My CLI Token\")"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scope"
            },
            "description": "List of permission scopes assigned to the token"
          }
        }
      },
      "CreateWebhookParams": {
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "properties": {
          "active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        }
      },
      "CreateWikiPageParams": {
        "type": "object",
        "required": [
          "title",
          "content"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "CreateWorkspaceParams": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "DeliveryChannel": {
        "type": "string",
        "enum": [
          "Email",
          "Web",
          "Push",
          "Slack",
          "Discord",
          "Webhook",
          "Sms",
          "Unknown"
        ]
      },
      "Density": {
        "type": "string",
        "enum": [
          "Compact",
          "Comfortable",
          "Spacious",
          "Unknown"
        ]
      },
      "DeviceType": {
        "type": "string",
        "enum": [
          "Desktop",
          "Laptop",
          "Mobile",
          "Tablet",
          "Browser",
          "Cli",
          "Api",
          "Unknown"
        ]
      },
      "DiffFile": {
        "type": "object",
        "required": [
          "old_path",
          "new_path",
          "old_mode",
          "new_mode",
          "change_type",
          "binary",
          "too_large",
          "additions",
          "deletions",
          "hunks",
          "patch",
          "similarity"
        ],
        "properties": {
          "additions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "binary": {
            "type": "boolean"
          },
          "change_type": {
            "type": "integer",
            "format": "int32"
          },
          "deletions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "hunks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiffHunk"
            }
          },
          "new_mode": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "new_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "new_path": {
            "type": "string"
          },
          "old_mode": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "old_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "old_path": {
            "type": "string"
          },
          "patch": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "similarity": {
            "type": "number",
            "format": "double"
          },
          "too_large": {
            "type": "boolean"
          }
        }
      },
      "DiffHunk": {
        "type": "object",
        "required": [
          "header",
          "old_start",
          "old_lines",
          "new_start",
          "new_lines",
          "lines"
        ],
        "properties": {
          "header": {
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiffLine"
            }
          },
          "new_lines": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "new_start": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "old_lines": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "old_start": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "DiffLine": {
        "type": "object",
        "required": [
          "type",
          "old_line",
          "new_line",
          "content",
          "truncated"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "new_line": {
            "type": "integer",
            "format": "int32"
          },
          "old_line": {
            "type": "integer",
            "format": "int32"
          },
          "truncated": {
            "type": "boolean"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "DiffStats": {
        "type": "object",
        "required": [
          "additions",
          "deletions",
          "changed_files"
        ],
        "properties": {
          "additions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "changed_files": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "deletions": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "DigestFrequency": {
        "type": "string",
        "enum": [
          "Never",
          "Daily",
          "Weekly",
          "Monthly",
          "Realtime",
          "Unknown"
        ]
      },
      "Disable2FAParams": {
        "type": "object",
        "required": [
          "code",
          "password"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "DismissReviewParams": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "EmailChangeRequest": {
        "type": "object",
        "required": [
          "new_email",
          "password"
        ],
        "properties": {
          "new_email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "EmailResponse": {
        "type": "object",
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EmailVerifyRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "Enable2FAResponse": {
        "type": "object",
        "required": [
          "secret",
          "qr_code",
          "backup_codes"
        ],
        "properties": {
          "backup_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "qr_code": {
            "type": "string"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "EventType": {
        "type": "string",
        "enum": [
          "Created",
          "Updated",
          "Deleted",
          "Closed",
          "Reopened",
          "Assigned",
          "Unassigned",
          "Labeled",
          "Unlabeled",
          "Commented",
          "Mentioned",
          "Pushed",
          "Merged",
          "Reviewed",
          "Archived",
          "Restored",
          "Joined",
          "Left",
          "Invited",
          "Accepted",
          "Revoked",
          "DraftReady",
          "Unknown"
        ]
      },
      "FontSize": {
        "type": "string",
        "enum": [
          "Small",
          "Medium",
          "Large",
          "ExtraLarge",
          "Unknown"
        ]
      },
      "ForkRepoParams": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "target_workspace_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ForumLayout": {
        "type": "string",
        "enum": [
          "Default",
          "ListView",
          "GalleryView",
          "Unknown"
        ]
      },
      "ForumSortOrder": {
        "type": "string",
        "enum": [
          "LatestActivity",
          "CreationDate",
          "Unknown"
        ]
      },
      "Get2FAStatusResponse": {
        "type": "object",
        "required": [
          "is_enabled",
          "has_backup_codes"
        ],
        "properties": {
          "has_backup_codes": {
            "type": "boolean"
          },
          "is_enabled": {
            "type": "boolean"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "GetDiffResponse": {
        "type": "object",
        "required": [
          "files",
          "overflow"
        ],
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiffFile"
            }
          },
          "overflow": {
            "type": "boolean"
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DiffStats"
              }
            ]
          }
        }
      },
      "GitService": {
        "type": "string",
        "enum": [
          "Local",
          "Gitea",
          "Gitlab",
          "Github",
          "Unknown"
        ]
      },
      "Identity": {
        "type": "object",
        "description": "Git identity attached to commits and tags.",
        "required": [
          "name",
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "InviteMemberParams": {
        "type": "object",
        "required": [
          "user_id"
        ],
        "properties": {
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Issue": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "author_id",
          "number",
          "title",
          "state",
          "priority",
          "visibility",
          "locked",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "locked": {
            "type": "boolean"
          },
          "milestone_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "$ref": "#/components/schemas/Priority"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueAssignee": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "assignee_id",
          "created_at"
        ],
        "properties": {
          "assigned_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignee_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "number",
          "title",
          "state",
          "workspace_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "title": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueComment": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "author_id",
          "body",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "edited_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "reply_to_comment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IssueCommentDetail": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "author",
          "body",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "reply_to_comment_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IssueDetail": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "author",
          "number",
          "title",
          "state",
          "priority",
          "visibility",
          "locked",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "locked": {
            "type": "boolean"
          },
          "milestone_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "priority": {
            "$ref": "#/components/schemas/Priority"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueEvent": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "event_type",
          "created_at"
        ],
        "properties": {
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_type": {
            "$ref": "#/components/schemas/EventType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "new_value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "old_value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          }
        }
      },
      "IssueLabel": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "name",
          "color",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "color": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IssueLabelRelation": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "label_id",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "label_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueListFilters": {
        "type": "object",
        "properties": {
          "assignee_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "author_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "label_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "milestone_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "IssueMilestone": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "title",
          "state",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "IssuePrRelation": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "pull_request_id",
          "relation_type",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "relation_type": {
            "$ref": "#/components/schemas/RelationType"
          }
        }
      },
      "IssueReaction": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "user_id",
          "content",
          "target_type",
          "created_at"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueRepoRelation": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "repo_id",
          "relation_type",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "relation_type": {
            "$ref": "#/components/schemas/RelationType"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueSubscriber": {
        "type": "object",
        "required": [
          "id",
          "issue_id",
          "user_id",
          "reason",
          "muted",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": "string",
            "format": "uuid"
          },
          "muted": {
            "type": "boolean"
          },
          "reason": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "IssueTemplate": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "name",
          "body_template",
          "labels",
          "active",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "active": {
            "type": "boolean"
          },
          "body_template": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "title_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "KeyType": {
        "type": "string",
        "enum": [
          "Rsa",
          "Ed25519",
          "Ecdsa",
          "Dsa",
          "Unknown"
        ]
      },
      "LinkPrParams": {
        "type": "object",
        "required": [
          "pull_request_id"
        ],
        "properties": {
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "relation_type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "LinkRepoParams": {
        "type": "object",
        "required": [
          "repo_id"
        ],
        "properties": {
          "relation_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ListBranchesResponse": {
        "type": "object",
        "required": [
          "branches"
        ],
        "properties": {
          "branches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Branch"
            }
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          }
        }
      },
      "ListCommitsResponse": {
        "type": "object",
        "required": [
          "commits"
        ],
        "properties": {
          "commits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Commit"
            }
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          }
        }
      },
      "ListMergeConflictsResponse": {
        "type": "object",
        "required": [
          "conflicts"
        ],
        "properties": {
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MergeConflict"
            }
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          }
        }
      },
      "ListTagsResponse": {
        "type": "object",
        "required": [
          "tags"
        ],
        "properties": {
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tag"
            }
          }
        }
      },
      "ListTreeResponse": {
        "type": "object",
        "required": [
          "entries",
          "truncated"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TreeEntry"
            }
          },
          "page_info": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PageInfo"
              }
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "LockIssueParams": {
        "type": "object",
        "required": [
          "locked"
        ],
        "properties": {
          "locked": {
            "type": "boolean",
            "description": "Whether to lock (true) or unlock (false) the issue"
          }
        }
      },
      "LockPrParams": {
        "type": "object",
        "required": [
          "locked"
        ],
        "properties": {
          "locked": {
            "type": "boolean",
            "description": "Whether to lock (true) or unlock (false) the PR conversation"
          }
        }
      },
      "LoginParams": {
        "type": "object",
        "required": [
          "username",
          "password",
          "captcha"
        ],
        "properties": {
          "captcha": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "totp_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": "string"
          }
        }
      },
      "MergeConflict": {
        "type": "object",
        "required": [
          "path",
          "mode",
          "sections",
          "binary"
        ],
        "properties": {
          "base_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "binary": {
            "type": "boolean"
          },
          "mode": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "ours_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MergeConflictSection"
            }
          },
          "theirs_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          }
        }
      },
      "MergeConflictSection": {
        "type": "object",
        "required": [
          "label",
          "content"
        ],
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "label": {
            "type": "string"
          }
        }
      },
      "MergeParams": {
        "type": "object",
        "required": [
          "target_branch",
          "source"
        ],
        "properties": {
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "no_commit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "source": {
            "type": "string"
          },
          "squash": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "target_branch": {
            "type": "string"
          }
        }
      },
      "MergePrParams": {
        "type": "object",
        "properties": {
          "delete_source_branch": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "squash_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "squash_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategy": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MergeResult": {
        "type": "object",
        "required": [
          "status",
          "conflicts",
          "message"
        ],
        "properties": {
          "commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Commit"
              }
            ]
          },
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MergeConflict"
            }
          },
          "merge_base": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "message": {
            "type": "string"
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DiffStats"
              }
            ]
          },
          "status": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MergeStrategyKind": {
        "type": "string",
        "enum": [
          "Merge",
          "Squash",
          "Rebase",
          "FastForward",
          "Unknown"
        ]
      },
      "MuteIssueParams": {
        "type": "object",
        "required": [
          "muted"
        ],
        "properties": {
          "muted": {
            "type": "boolean",
            "description": "Whether to mute (true) or unmute (false) notifications"
          }
        }
      },
      "MutePrParams": {
        "type": "object",
        "required": [
          "muted"
        ],
        "properties": {
          "muted": {
            "type": "boolean",
            "description": "Whether to mute (true) or unmute (false) notifications"
          }
        }
      },
      "Notification": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "notification_type",
          "title",
          "priority",
          "metadata",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "action_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {},
          "notification_type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "priority": {
            "$ref": "#/components/schemas/Priority"
          },
          "pull_request_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TargetType"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "NotificationBlock": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "target_type",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "channel": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeliveryChannel"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "notification_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/NotificationType"
              }
            ]
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "NotificationDelivery": {
        "type": "object",
        "required": [
          "id",
          "notification_id",
          "user_id",
          "channel",
          "status",
          "attempts",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "attempts": {
            "type": "integer",
            "format": "int32"
          },
          "channel": {
            "$ref": "#/components/schemas/DeliveryChannel"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "destination": {
            "type": [
              "string",
              "null"
            ]
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "notification_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Provider"
              }
            ]
          },
          "provider_message_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "NotificationDetail": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "notification_type",
          "title",
          "priority",
          "metadata",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "action_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UserBaseInfo"
              }
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "issue_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "message_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "metadata": {},
          "notification_type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "priority": {
            "$ref": "#/components/schemas/Priority"
          },
          "pull_request_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repo": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RepoBaseInfo"
              }
            ]
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TargetType"
              }
            ]
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WorkspaceBaseInfo"
              }
            ]
          }
        }
      },
      "NotificationSubscription": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "target_type",
          "event_types",
          "channels",
          "level",
          "muted",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "level": {
            "$ref": "#/components/schemas/SubscriptionLevel"
          },
          "muted": {
            "type": "boolean"
          },
          "muted_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "NotificationTemplate": {
        "type": "object",
        "required": [
          "id",
          "key",
          "notification_type",
          "channel",
          "locale",
          "title_template",
          "body_template",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "action_text_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "body_template": {
            "type": "string"
          },
          "channel": {
            "$ref": "#/components/schemas/DeliveryChannel"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "notification_type": {
            "$ref": "#/components/schemas/NotificationType"
          },
          "subject_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "title_template": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "NotificationType": {
        "type": "string",
        "enum": [
          "Mention",
          "Assignment",
          "Review",
          "Comment",
          "Build",
          "Security",
          "Billing",
          "System",
          "Digest",
          "Unknown"
        ]
      },
      "Oid": {
        "type": "object",
        "description": "Canonical object id. `value` preserves the original binary representation used\nby the existing API; `hex` is the normalized lowercase hex form for clients.",
        "required": [
          "value",
          "hex",
          "format"
        ],
        "properties": {
          "format": {
            "type": "integer",
            "format": "int32"
          },
          "hex": {
            "type": "string"
          },
          "value": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        }
      },
      "PageInfo": {
        "type": "object",
        "required": [
          "next_page_token",
          "has_next_page",
          "total_count"
        ],
        "properties": {
          "has_next_page": {
            "type": "boolean"
          },
          "next_page_token": {
            "type": "string"
          },
          "total_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "Permission": {
        "type": "string",
        "enum": [
          "Read",
          "Write",
          "Admin",
          "Execute",
          "ManageMembers",
          "ManageSettings",
          "ManageWebhooks",
          "ManageBilling",
          "Unknown"
        ]
      },
      "PrAssignee": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "assignee_id",
          "created_at"
        ],
        "properties": {
          "assigned_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "assignee_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PrCheckRun": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "commit_sha",
          "name",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "conclusion": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Status"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "details_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrCommit": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "repo_id",
          "commit_sha",
          "position",
          "created_at"
        ],
        "properties": {
          "authored_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "commit_sha": {
            "type": "string"
          },
          "committed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "position": {
            "type": "integer",
            "format": "int32"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PrEvent": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "event_type",
          "created_at"
        ],
        "properties": {
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_type": {
            "$ref": "#/components/schemas/EventType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "new_value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "old_value": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PrFile": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "path",
          "status",
          "additions",
          "deletions",
          "changes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "additions": {
            "type": "integer",
            "format": "int32"
          },
          "changes": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deletions": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "old_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "patch": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": "string"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrLabel": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "name",
          "color",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "color": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrLabelRelation": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "label_id",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label_id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PrListFilters": {
        "type": "object",
        "properties": {
          "author_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "draft": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PrMergeStrategy": {
        "type": "object",
        "required": [
          "pull_request_id",
          "strategy",
          "auto_merge",
          "delete_source_branch",
          "merge_when_checks_pass",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "auto_merge": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delete_source_branch": {
            "type": "boolean"
          },
          "merge_when_checks_pass": {
            "type": "boolean"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "selected_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "squash_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "squash_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategy": {
            "$ref": "#/components/schemas/MergeStrategyKind"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrReaction": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "user_id",
          "content",
          "target_type",
          "created_at"
        ],
        "properties": {
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "$ref": "#/components/schemas/TargetType"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PrReview": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "author_id",
          "state",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "dismiss_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dismissed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "submitted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrReviewComment": {
        "type": "object",
        "required": [
          "id",
          "review_id",
          "pull_request_id",
          "author_id",
          "body",
          "path",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "diff_hunk": {
            "type": [
              "string",
              "null"
            ]
          },
          "edited_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "in_reply_to_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "original_line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "original_start_line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "path": {
            "type": "string"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "review_id": {
            "type": "string",
            "format": "uuid"
          },
          "start_line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrReviewDetail": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "author",
          "state",
          "dismissed",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "dismissed": {
            "type": "boolean"
          },
          "dismissed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "dismissed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrStatus": {
        "type": "object",
        "required": [
          "pull_request_id",
          "head_commit_sha",
          "checks_state",
          "mergeable_state",
          "conflicts",
          "approvals_count",
          "requested_reviews_count",
          "changed_files_count",
          "additions_count",
          "deletions_count",
          "updated_at"
        ],
        "properties": {
          "additions_count": {
            "type": "integer",
            "format": "int32"
          },
          "approvals_count": {
            "type": "integer",
            "format": "int32"
          },
          "changed_files_count": {
            "type": "integer",
            "format": "int32"
          },
          "checks_state": {
            "$ref": "#/components/schemas/State"
          },
          "conflicts": {
            "type": "boolean"
          },
          "deletions_count": {
            "type": "integer",
            "format": "int32"
          },
          "head_commit_sha": {
            "type": "string"
          },
          "mergeable_state": {
            "$ref": "#/components/schemas/State"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "requested_reviews_count": {
            "type": "integer",
            "format": "int32"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PrSubscription": {
        "type": "object",
        "required": [
          "id",
          "pull_request_id",
          "user_id",
          "reason",
          "muted",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "muted": {
            "type": "boolean"
          },
          "pull_request_id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "PresenceStatus": {
        "type": "string",
        "enum": [
          "Online",
          "Idle",
          "Dnd",
          "Invisible",
          "Offline",
          "Away",
          "Unknown"
        ]
      },
      "Priority": {
        "type": "string",
        "enum": [
          "None",
          "Low",
          "Medium",
          "High",
          "Critical",
          "Urgent",
          "Unknown"
        ]
      },
      "Provider": {
        "type": "string",
        "enum": [
          "Github",
          "Gitlab",
          "Google",
          "Slack",
          "Discord",
          "Email",
          "Web",
          "Push",
          "Openai",
          "Anthropic",
          "Gemini",
          "Ollama",
          "Azure",
          "Aws",
          "Stripe",
          "Unknown"
        ]
      },
      "PullRequest": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "author_id",
          "number",
          "title",
          "state",
          "source_repo_id",
          "source_branch",
          "target_repo_id",
          "target_branch",
          "head_commit_sha",
          "draft",
          "locked",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "base_commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "draft": {
            "type": "boolean"
          },
          "head_commit_sha": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "locked": {
            "type": "boolean"
          },
          "merge_commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "merged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "merged_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_branch": {
            "type": "string"
          },
          "source_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "target_branch": {
            "type": "string"
          },
          "target_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PullRequestBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "number",
          "title",
          "state",
          "repo_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "PullRequestDetail": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "author",
          "number",
          "title",
          "state",
          "source_repo_id",
          "source_branch",
          "target_repo_id",
          "target_branch",
          "head_commit_sha",
          "draft",
          "locked",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "base_commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "closed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "draft": {
            "type": "boolean"
          },
          "head_commit_sha": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "locked": {
            "type": "boolean"
          },
          "merge_commit_sha": {
            "type": [
              "string",
              "null"
            ]
          },
          "merged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "merged_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "source_branch": {
            "type": "string"
          },
          "source_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "target_branch": {
            "type": "string"
          },
          "target_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RebaseParams": {
        "type": "object",
        "required": [
          "branch",
          "upstream"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "upstream": {
            "type": "string"
          }
        }
      },
      "RebaseResult": {
        "type": "object",
        "required": [
          "status",
          "conflicts"
        ],
        "properties": {
          "conflicts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MergeConflict"
            }
          },
          "head": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Commit"
              }
            ]
          },
          "status": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "RecentCommit": {
        "type": "object",
        "required": [
          "subject",
          "committed_timestamp"
        ],
        "properties": {
          "committed_timestamp": {
            "type": "integer",
            "format": "int64"
          },
          "oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "subject": {
            "type": "string"
          }
        }
      },
      "Regenerate2FABackupCodesRequest": {
        "type": "object",
        "required": [
          "password"
        ],
        "properties": {
          "password": {
            "type": "string",
            "description": "Current account password encrypted with the session RSA public key."
          }
        }
      },
      "Regenerate2FABackupCodesResponse": {
        "type": "object",
        "required": [
          "backup_codes"
        ],
        "properties": {
          "backup_codes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Newly generated one-time backup codes. Old backup codes become invalid."
          }
        }
      },
      "RegisterEmailCodeParams": {
        "type": "object",
        "required": [
          "email",
          "captcha"
        ],
        "properties": {
          "captcha": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "RegisterEmailCodeResponse": {
        "type": "object",
        "required": [
          "expires_in_secs"
        ],
        "properties": {
          "expires_in_secs": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "RegisterParams": {
        "type": "object",
        "required": [
          "username",
          "email",
          "password",
          "captcha",
          "email_code"
        ],
        "properties": {
          "captcha": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "email_code": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "RegisterResponse": {
        "type": "object",
        "required": [
          "id",
          "username"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Avatar URL; usually absent right after registration."
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name initialized from username."
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Newly created user id."
          },
          "username": {
            "type": "string",
            "description": "Unique username used for login and profile URL."
          }
        }
      },
      "RelationType": {
        "type": "string",
        "enum": [
          "Closes",
          "Fixes",
          "References",
          "Blocks",
          "Duplicates",
          "Related",
          "Implements",
          "Mentions",
          "Resolves",
          "Unknown"
        ]
      },
      "Repo": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "owner_id",
          "name",
          "default_branch",
          "visibility",
          "status",
          "is_fork",
          "storage_node_ids",
          "primary_storage_node_id",
          "storage_path",
          "git_service",
          "created_at",
          "updated_at",
          "topics",
          "has_issues",
          "has_wiki",
          "has_pull_requests",
          "allow_forking",
          "allow_merge_commit",
          "allow_squash_merge",
          "allow_rebase_merge",
          "delete_branch_on_merge"
        ],
        "properties": {
          "allow_forking": {
            "type": "boolean"
          },
          "allow_merge_commit": {
            "type": "boolean"
          },
          "allow_rebase_merge": {
            "type": "boolean"
          },
          "allow_squash_merge": {
            "type": "boolean"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "default_branch": {
            "type": "string"
          },
          "delete_branch_on_merge": {
            "type": "boolean"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "forked_from_repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "git_service": {
            "$ref": "#/components/schemas/GitService"
          },
          "has_issues": {
            "type": "boolean"
          },
          "has_pull_requests": {
            "type": "boolean"
          },
          "has_wiki": {
            "type": "boolean"
          },
          "homepage": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_fork": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "type": "string",
            "format": "uuid"
          },
          "primary_storage_node_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "storage_node_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "storage_path": {
            "type": "string"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "workspace_id",
          "visibility",
          "is_fork"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_fork": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoBranch": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "name",
          "commit_sha",
          "protected",
          "default_branch",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "commit_sha": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "default_branch": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_push_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_push_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "protected": {
            "type": "boolean"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RepoCommitComment": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "push_commit_id",
          "commit_sha",
          "author_id",
          "body",
          "resolved",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": "string"
          },
          "commit_sha": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "push_commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "resolved": {
            "type": "boolean"
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolved_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RepoCommitStatus": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "push_commit_id",
          "latest_commit_sha",
          "context",
          "state",
          "reported_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "context": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "latest_commit_sha": {
            "type": "string"
          },
          "push_commit_id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "reported_at": {
            "type": "string",
            "format": "date-time"
          },
          "reported_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/State"
          },
          "target_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RepoDeployKey": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "title",
          "public_key",
          "fingerprint_sha256",
          "key_type",
          "read_only",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fingerprint_sha256": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_type": {
            "$ref": "#/components/schemas/KeyType"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "public_key": {
            "type": "string"
          },
          "read_only": {
            "type": "boolean"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RepoDetail": {
        "type": "object",
        "required": [
          "id",
          "workspace",
          "owner",
          "name",
          "default_branch",
          "visibility",
          "status",
          "is_fork",
          "storage_node_ids",
          "primary_storage_node_id",
          "storage_path",
          "git_service",
          "created_at",
          "updated_at",
          "topics",
          "has_issues",
          "has_wiki",
          "has_pull_requests",
          "allow_forking",
          "allow_merge_commit",
          "allow_squash_merge",
          "allow_rebase_merge",
          "delete_branch_on_merge"
        ],
        "properties": {
          "allow_forking": {
            "type": "boolean"
          },
          "allow_merge_commit": {
            "type": "boolean"
          },
          "allow_rebase_merge": {
            "type": "boolean"
          },
          "allow_squash_merge": {
            "type": "boolean"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "default_branch": {
            "type": "string"
          },
          "delete_branch_on_merge": {
            "type": "boolean"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "forked_from_repo_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "git_service": {
            "$ref": "#/components/schemas/GitService"
          },
          "has_issues": {
            "type": "boolean"
          },
          "has_pull_requests": {
            "type": "boolean"
          },
          "has_wiki": {
            "type": "boolean"
          },
          "homepage": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_fork": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "primary_storage_node_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "storage_node_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "storage_path": {
            "type": "string"
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          },
          "workspace": {
            "$ref": "#/components/schemas/WorkspaceBaseInfo"
          }
        }
      },
      "RepoFork": {
        "type": "object",
        "required": [
          "id",
          "parent_repo_id",
          "fork_repo_id",
          "forked_by",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "fork_repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "forked_by": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "parent_repo_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoInvitation": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "email",
          "role",
          "token_hash",
          "invited_by",
          "expires_at",
          "created_at"
        ],
        "properties": {
          "accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "accepted_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "token_hash": {
            "type": "string"
          }
        }
      },
      "RepoMember": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "user_id",
          "role",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "joined_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_active_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoRelease": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "tag_name",
          "title",
          "draft",
          "prerelease",
          "author_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "draft": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "prerelease": {
            "type": "boolean"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "tag_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "tag_name": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RepoStar": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "user_id",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoStats": {
        "type": "object",
        "required": [
          "repo_id",
          "stars_count",
          "watchers_count",
          "forks_count",
          "branches_count",
          "tags_count",
          "commits_count",
          "releases_count",
          "open_issues_count",
          "open_pull_requests_count",
          "size_bytes",
          "updated_at"
        ],
        "properties": {
          "branches_count": {
            "type": "integer",
            "format": "int64"
          },
          "commits_count": {
            "type": "integer",
            "format": "int64"
          },
          "forks_count": {
            "type": "integer",
            "format": "int64"
          },
          "last_push_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "open_issues_count": {
            "type": "integer",
            "format": "int64"
          },
          "open_pull_requests_count": {
            "type": "integer",
            "format": "int64"
          },
          "releases_count": {
            "type": "integer",
            "format": "int64"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "stars_count": {
            "type": "integer",
            "format": "int64"
          },
          "tags_count": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "watchers_count": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RepoTag": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "name",
          "target_commit_sha",
          "signed",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "signed": {
            "type": "boolean"
          },
          "tagger_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_commit_sha": {
            "type": "string"
          }
        }
      },
      "RepoWatch": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "user_id",
          "level",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "level": {
            "$ref": "#/components/schemas/SubscriptionLevel"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "RepoWebhook": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "url",
          "events",
          "active",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_delivery_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_delivery_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Repository": {
        "type": "object",
        "required": [
          "bare",
          "empty",
          "object_format",
          "default_branch",
          "git_object_directory",
          "git_alternate_object_directories"
        ],
        "properties": {
          "bare": {
            "type": "boolean"
          },
          "default_branch": {
            "type": "string"
          },
          "empty": {
            "type": "boolean"
          },
          "git_alternate_object_directories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "git_object_directory": {
            "type": "string"
          },
          "header": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RepositoryHeader"
              }
            ]
          },
          "object_format": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "RepositoryHeader": {
        "type": "object",
        "description": "Repository identity used by storage-facing RPCs.",
        "required": [
          "storage_name",
          "relative_path",
          "storage_path"
        ],
        "properties": {
          "relative_path": {
            "type": "string",
            "description": "Path relative to the storage root, usually ending in `.git` for bare repos."
          },
          "storage_name": {
            "type": "string",
            "description": "Logical storage shard or disk name."
          },
          "storage_path": {
            "type": "string",
            "description": "Optional absolute path for embedded/local deployments."
          }
        }
      },
      "RepositoryHealthResponse": {
        "type": "object",
        "required": [
          "ok",
          "warnings",
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ok": {
            "type": "boolean"
          },
          "statistics": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RepositoryStatistics"
              }
            ]
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RepositoryMaintenanceResponse": {
        "type": "object",
        "required": [
          "ok",
          "stdout",
          "stderr"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "stderr": {
            "type": "string"
          },
          "stdout": {
            "type": "string"
          }
        }
      },
      "RepositoryStatistics": {
        "type": "object",
        "required": [
          "size_bytes",
          "loose_object_count",
          "packed_object_count",
          "packfile_count",
          "reference_count",
          "commit_graph_size_bytes",
          "multi_pack_index_size_bytes"
        ],
        "properties": {
          "commit_graph_size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "loose_object_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "multi_pack_index_size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "packed_object_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "packfile_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "reference_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "size_bytes": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "RequestApprovalParams": {
        "type": "object",
        "required": [
          "request_type"
        ],
        "properties": {
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_type": {
            "type": "string"
          }
        }
      },
      "RequestType": {
        "type": "string",
        "enum": [
          "Join",
          "Invite",
          "Access",
          "Approval",
          "Billing",
          "Delete",
          "Transfer",
          "Unknown"
        ]
      },
      "ResetPasswordRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "ResetPasswordVerifyParams": {
        "type": "object",
        "required": [
          "token",
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "RevertParams": {
        "type": "object",
        "required": [
          "commit",
          "branch"
        ],
        "properties": {
          "branch": {
            "type": "string"
          },
          "commit": {
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ReviewApprovalRequest": {
        "type": "object",
        "required": [
          "approved"
        ],
        "properties": {
          "approved": {
            "type": "boolean",
            "description": "true to approve, false to reject."
          }
        }
      },
      "ReviewCommentParams": {
        "type": "object",
        "required": [
          "path",
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          },
          "diff_hunk": {
            "type": [
              "string",
              "null"
            ]
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "path": {
            "type": "string"
          },
          "start_line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "Role": {
        "type": "string",
        "enum": [
          "Owner",
          "Admin",
          "Maintainer",
          "Member",
          "Guest",
          "Viewer",
          "Editor",
          "Contributor",
          "Moderator",
          "User",
          "Bot",
          "Agent",
          "Assistant",
          "System",
          "Author",
          "Reviewer",
          "Assignee",
          "Unknown"
        ]
      },
      "RsaResponse": {
        "type": "object",
        "required": [
          "public_key"
        ],
        "properties": {
          "public_key": {
            "type": "string"
          }
        }
      },
      "Scope": {
        "type": "string",
        "enum": [
          "Read",
          "Write",
          "Admin",
          "RepoRead",
          "RepoWrite",
          "IssueRead",
          "IssueWrite",
          "PullRequestRead",
          "PullRequestWrite",
          "WorkspaceRead",
          "WorkspaceWrite",
          "UserRead",
          "UserWrite",
          "Unknown"
        ]
      },
      "SetBranchProtectionParams": {
        "type": "object",
        "required": [
          "protected"
        ],
        "properties": {
          "protected": {
            "type": "boolean"
          }
        }
      },
      "Signature": {
        "type": "object",
        "description": "Git signature with timestamp and timezone offset.",
        "required": [
          "timezone_offset"
        ],
        "properties": {
          "identity": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Identity"
              }
            ]
          },
          "timezone_offset": {
            "type": "integer",
            "format": "int32",
            "description": "Offset in minutes east of UTC, as stored by git."
          },
          "when": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Timestamp"
              }
            ]
          }
        }
      },
      "State": {
        "type": "string",
        "enum": [
          "Open",
          "Closed",
          "Merged",
          "Draft",
          "Pending",
          "Queued",
          "Running",
          "Success",
          "Failure",
          "Failed",
          "Error",
          "Skipped",
          "Blocked",
          "Clean",
          "Dirty",
          "Unknown"
        ]
      },
      "Status": {
        "type": "string",
        "description": "Cross-domain lifecycle/status values persisted as snake_case text.",
        "enum": [
          "Active",
          "Inactive",
          "Enabled",
          "Disabled",
          "Pending",
          "Queued",
          "Running",
          "Processing",
          "Completed",
          "Success",
          "Failed",
          "Error",
          "Canceled",
          "Cancelled",
          "Draft",
          "Open",
          "Closed",
          "Merged",
          "Archived",
          "Deleted",
          "Revoked",
          "Expired",
          "Accepted",
          "Rejected",
          "Approved",
          "Healthy",
          "Degraded",
          "Unhealthy",
          "Online",
          "Offline",
          "Added",
          "Modified",
          "Removed",
          "Renamed",
          "Copied",
          "Unknown"
        ]
      },
      "SubmitReviewParams": {
        "type": "object",
        "required": [
          "state"
        ],
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "type": "string"
          }
        }
      },
      "SubscriptionLevel": {
        "type": "string",
        "enum": [
          "All",
          "Participating",
          "Mention",
          "Watch",
          "Ignore",
          "None",
          "Custom",
          "Unknown"
        ]
      },
      "Tag": {
        "type": "object",
        "required": [
          "name",
          "full_ref",
          "target_type",
          "annotated",
          "message",
          "raw"
        ],
        "properties": {
          "annotated": {
            "type": "boolean"
          },
          "full_ref": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "raw": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          "signature": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/VerifiedSignature"
              }
            ]
          },
          "tag_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "tagger": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Signature"
              }
            ]
          },
          "target_oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "target_type": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TargetType": {
        "type": "string",
        "enum": [
          "User",
          "Workspace",
          "Repo",
          "Issue",
          "PullRequest",
          "Channel",
          "Message",
          "Conversation",
          "Agent",
          "AiModel",
          "Commit",
          "Branch",
          "Release",
          "Unknown"
        ]
      },
      "Theme": {
        "type": "string",
        "enum": [
          "System",
          "Light",
          "Dark",
          "Unknown"
        ]
      },
      "Timestamp": {
        "type": "object",
        "required": [
          "seconds",
          "nanos"
        ],
        "properties": {
          "nanos": {
            "type": "integer",
            "format": "int32"
          },
          "seconds": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "TransferIssueParams": {
        "type": "object",
        "required": [
          "target_workspace_name"
        ],
        "properties": {
          "target_workspace_name": {
            "type": "string",
            "description": "Target workspace name to transfer the issue to"
          }
        }
      },
      "TransferOwnerParams": {
        "type": "object",
        "required": [
          "new_owner_id"
        ],
        "properties": {
          "new_owner_id": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the new owner (must be a repository member)"
          }
        }
      },
      "TransferOwnerRequest": {
        "type": "object",
        "required": [
          "new_owner_id"
        ],
        "properties": {
          "new_owner_id": {
            "type": "string",
            "format": "uuid",
            "description": "User ID of the new owner, who must be an active member."
          }
        }
      },
      "TreeEntry": {
        "type": "object",
        "required": [
          "name",
          "path",
          "type",
          "mode",
          "size",
          "is_lfs"
        ],
        "properties": {
          "is_lfs": {
            "type": "boolean"
          },
          "mode": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "oid": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Oid"
              }
            ]
          },
          "path": {
            "type": "string"
          },
          "recent_commit": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecentCommit"
              }
            ]
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "type": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "UpdateBillingParams": {
        "type": "object",
        "properties": {
          "billing_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "type": [
              "string",
              "null"
            ]
          },
          "seats": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateBrandingParams": {
        "type": "object",
        "properties": {
          "accent_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_css": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "favicon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "support_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateCategoryParams": {
        "type": "object",
        "properties": {
          "collapsed": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateChannelParams": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "nsfw": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rate_limit_per_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "read_only": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "topic": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateCheckRunParams": {
        "type": "object",
        "properties": {
          "conclusion": {
            "type": [
              "string",
              "null"
            ]
          },
          "details_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateCommentParams": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          }
        }
      },
      "UpdateCommitCommentParams": {
        "type": "object",
        "required": [
          "body"
        ],
        "properties": {
          "body": {
            "type": "string"
          }
        }
      },
      "UpdateDomainParams": {
        "type": "object",
        "required": [
          "domain"
        ],
        "properties": {
          "domain": {
            "type": "string"
          }
        }
      },
      "UpdateIntegrationParams": {
        "type": "object",
        "properties": {
          "config": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WorkspaceIntegrationConfig"
              }
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateIssueParams": {
        "type": "object",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "milestone_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "priority": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateLabelParams": {
        "type": "object",
        "properties": {
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateMemberParams": {
        "type": "object",
        "properties": {
          "muted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "pinned": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateMemberRoleParams": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "type": "string"
          }
        }
      },
      "UpdateMergeStrategyParams": {
        "type": "object",
        "properties": {
          "auto_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "delete_source_branch": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "merge_when_checks_pass": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "squash_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "squash_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "strategy": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateMilestoneParams": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "due_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdatePrLabelParams": {
        "type": "object",
        "properties": {
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdatePrParams": {
        "type": "object",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "target_branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdatePresenceBody": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "custom_status_emoji": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional custom status emoji (e.g., \":palm_tree:\")"
          },
          "custom_status_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional custom status text (e.g., \"In a meeting\")"
          },
          "device_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeviceType",
                "description": "Device type the user is currently using"
              }
            ]
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "IP address of the current session"
          },
          "status": {
            "$ref": "#/components/schemas/PresenceStatus",
            "description": "New presence status"
          }
        }
      },
      "UpdateProtectionRuleParams": {
        "type": "object",
        "properties": {
          "allow_deletions": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_force_pushes": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dismiss_stale_reviews": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "dismissal_allowances": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "push_allowances": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "require_approvals": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "require_code_owner_review": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_conversation_resolution": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_linear_history": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_signed_commits": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_status_checks": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "required_status_checks": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "restrict_pushes": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "restrict_review_dismissal": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "UpdateReleaseParams": {
        "type": "object",
        "properties": {
          "body": {
            "type": [
              "string",
              "null"
            ]
          },
          "draft": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "prerelease": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateRepoMemberRoleParams": {
        "type": "object",
        "required": [
          "role"
        ],
        "properties": {
          "role": {
            "type": "string"
          }
        }
      },
      "UpdateRepoParams": {
        "type": "object",
        "properties": {
          "allow_forking": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_merge_commit": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_rebase_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_squash_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "default_branch": {
            "type": [
              "string",
              "null"
            ]
          },
          "delete_branch_on_merge": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "has_issues": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "has_pull_requests": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "has_wiki": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "homepage": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "topics": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateSubscriptionParams": {
        "type": "object",
        "properties": {
          "channels": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "event_types": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "level": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SubscriptionLevel"
              }
            ]
          },
          "muted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "muted_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "UpdateTagBody": {
        "type": "object",
        "properties": {
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "new_name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateTagParams": {
        "type": "object",
        "properties": {
          "message": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateTemplateParams": {
        "type": "object",
        "properties": {
          "action_text_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "body_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "subject_template": {
            "type": [
              "string",
              "null"
            ]
          },
          "title_template": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateUserAccountParams": {
        "type": "object",
        "properties": {
          "bio": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "username": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateUserAppearanceParams": {
        "type": "object",
        "properties": {
          "color_scheme": {
            "type": [
              "string",
              "null"
            ]
          },
          "density": {
            "type": [
              "string",
              "null"
            ]
          },
          "editor_theme": {
            "type": [
              "string",
              "null"
            ]
          },
          "font_size": {
            "type": [
              "string",
              "null"
            ]
          },
          "markdown_preview": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "reduced_motion": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "theme": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateUserNotifySettingParams": {
        "type": "object",
        "properties": {
          "digest_frequency": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_notifications": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "marketing_emails": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "mention_notifications": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "review_notifications": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "security_notifications": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "web_notifications": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "UpdateUserProfileParams": {
        "type": "object",
        "properties": {
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_readme": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "twitter_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "website_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWebhookParams": {
        "type": "object",
        "properties": {
          "active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWikiPageParams": {
        "type": "object",
        "properties": {
          "commit_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "content": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWorkspaceParams": {
        "type": "object",
        "properties": {
          "default_role": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateWorkspaceSettingsParams": {
        "type": "object",
        "properties": {
          "allow_member_invites": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "allow_public_repos": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "default_branch_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "default_repo_visibility": {
            "type": [
              "string",
              "null"
            ]
          },
          "issue_tracking_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "pull_requests_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "require_two_factor": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "wiki_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          }
        }
      },
      "User": {
        "type": "object",
        "required": [
          "id",
          "username",
          "status",
          "role",
          "visibility",
          "is_active",
          "is_bot",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "bio": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          },
          "is_bot": {
            "type": "boolean"
          },
          "last_login_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "restore_token_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "restore_token_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "username": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        }
      },
      "UserAppearance": {
        "type": "object",
        "required": [
          "user_id",
          "theme",
          "color_scheme",
          "density",
          "font_size",
          "markdown_preview",
          "reduced_motion",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "color_scheme": {
            "$ref": "#/components/schemas/ColorScheme"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "density": {
            "$ref": "#/components/schemas/Density"
          },
          "editor_theme": {
            "type": [
              "string",
              "null"
            ]
          },
          "font_size": {
            "$ref": "#/components/schemas/FontSize"
          },
          "markdown_preview": {
            "type": "boolean"
          },
          "reduced_motion": {
            "type": "boolean"
          },
          "theme": {
            "$ref": "#/components/schemas/Theme"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "username",
          "is_bot"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_bot": {
            "type": "boolean"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "UserBlock": {
        "type": "object",
        "required": [
          "blocker_id",
          "blocked_id",
          "created_at"
        ],
        "properties": {
          "blocked_id": {
            "type": "string",
            "format": "uuid"
          },
          "blocker_id": {
            "type": "string",
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserDevice": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "device_name",
          "device_type",
          "trusted",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "device_name": {
            "type": "string"
          },
          "device_type": {
            "$ref": "#/components/schemas/DeviceType"
          },
          "fingerprint": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_seen_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "trusted": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserFollow": {
        "type": "object",
        "required": [
          "follower_id",
          "following_id",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "follower_id": {
            "type": "string",
            "format": "uuid"
          },
          "following_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserGpgKey": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "key_id",
          "public_key",
          "fingerprint",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fingerprint": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_id": {
            "type": "string"
          },
          "primary_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "public_key": {
            "type": "string"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "UserNotifySetting": {
        "type": "object",
        "required": [
          "user_id",
          "email_notifications",
          "web_notifications",
          "mention_notifications",
          "review_notifications",
          "security_notifications",
          "marketing_emails",
          "digest_frequency",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "digest_frequency": {
            "$ref": "#/components/schemas/DigestFrequency"
          },
          "email_notifications": {
            "type": "boolean"
          },
          "marketing_emails": {
            "type": "boolean"
          },
          "mention_notifications": {
            "type": "boolean"
          },
          "review_notifications": {
            "type": "boolean"
          },
          "security_notifications": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "web_notifications": {
            "type": "boolean"
          }
        }
      },
      "UserOAuthInfo": {
        "type": "object",
        "required": [
          "id",
          "provider",
          "provider_user_id",
          "linked_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "linked_at": {
            "type": "string",
            "format": "date-time"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "provider_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_user_id": {
            "type": "string"
          },
          "provider_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "UserPersonalAccessTokenInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "scopes",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scope"
            }
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UserPresence": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "status",
          "last_active_at",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_status_emoji": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_status_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "device_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeviceType"
              }
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_seen_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/PresenceStatus"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserProfile": {
        "type": "object",
        "required": [
          "user_id",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "company": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "full_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "profile_readme": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "twitter_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "website_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserSecurityLog": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "event_type",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_type": {
            "$ref": "#/components/schemas/EventType"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "UserSessionInfo": {
        "type": "object",
        "required": [
          "id",
          "last_active_at",
          "expires_at",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserSshKey": {
        "type": "object",
        "required": [
          "id",
          "user_id",
          "title",
          "public_key",
          "fingerprint_sha256",
          "key_type",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fingerprint_sha256": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_type": {
            "$ref": "#/components/schemas/KeyType"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "public_key": {
            "type": "string"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "Value": {},
      "VerifiedSignature": {
        "type": "object",
        "required": [
          "verified",
          "reason",
          "signature",
          "payload",
          "key_fingerprint",
          "signer"
        ],
        "properties": {
          "key_fingerprint": {
            "type": "string"
          },
          "payload": {
            "type": "string"
          },
          "reason": {
            "type": "integer",
            "format": "int32"
          },
          "signature": {
            "type": "string"
          },
          "signer": {
            "type": "string"
          },
          "verified": {
            "type": "boolean"
          }
        }
      },
      "Verify2FAParams": {
        "type": "object",
        "required": [
          "code"
        ],
        "properties": {
          "code": {
            "type": "string"
          }
        }
      },
      "Visibility": {
        "type": "string",
        "enum": [
          "Public",
          "Private",
          "Internal",
          "Workspace",
          "Protected",
          "Hidden",
          "Secret",
          "Unknown"
        ]
      },
      "WatchParams": {
        "type": "object",
        "properties": {
          "level": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "WikiCompareResult": {
        "type": "object",
        "description": "Result of comparing two wiki page revisions",
        "required": [
          "old",
          "new"
        ],
        "properties": {
          "new": {
            "$ref": "#/components/schemas/WikiPageRevision",
            "description": "The newer revision being compared"
          },
          "old": {
            "$ref": "#/components/schemas/WikiPageRevision",
            "description": "The older revision being compared"
          }
        }
      },
      "WikiPage": {
        "type": "object",
        "required": [
          "id",
          "repo_id",
          "slug",
          "title",
          "content",
          "author_id",
          "version",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "author_id": {
            "type": "string",
            "format": "uuid"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_editor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "WikiPageBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "title",
          "slug",
          "repo_id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "repo_id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "WikiPageRevision": {
        "type": "object",
        "required": [
          "id",
          "page_id",
          "version",
          "title",
          "content",
          "editor_id",
          "created_at"
        ],
        "properties": {
          "commit_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "editor_id": {
            "type": "string",
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "page_id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Workspace": {
        "type": "object",
        "required": [
          "id",
          "owner_id",
          "name",
          "visibility",
          "plan",
          "status",
          "default_role",
          "is_personal",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "default_role": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_personal": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        }
      },
      "WorkspaceAuditLog": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "action",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Value"
              }
            ]
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "target_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TargetType"
              }
            ]
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceBaseInfo": {
        "type": "object",
        "required": [
          "id",
          "name",
          "visibility"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        }
      },
      "WorkspaceBilling": {
        "type": "object",
        "required": [
          "workspace_id",
          "plan",
          "status",
          "seats",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "billing_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "canceled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "current_period_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "current_period_start": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "plan": {
            "type": "string"
          },
          "seats": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "subscription_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "trial_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceCustomBranding": {
        "type": "object",
        "required": [
          "workspace_id",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "accent_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_css": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "boolean"
          },
          "favicon_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary_color": {
            "type": [
              "string",
              "null"
            ]
          },
          "support_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceDetail": {
        "type": "object",
        "required": [
          "id",
          "owner",
          "name",
          "visibility",
          "plan",
          "status",
          "default_role",
          "is_personal",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "default_role": {
            "type": "string"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_personal": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/UserBaseInfo"
          },
          "plan": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility"
          }
        }
      },
      "WorkspaceDomain": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "domain",
          "is_primary",
          "is_verified",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "domain": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_primary": {
            "type": "boolean"
          },
          "is_verified": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "verification_token_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceIntegration": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "provider",
          "name",
          "config",
          "enabled",
          "installed_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "config": {},
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "enabled": {
            "type": "boolean"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "installed_by": {
            "type": "string",
            "format": "uuid"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceIntegrationConfig": {
        "type": "object",
        "required": [
          "scopes",
          "permissions",
          "repo_ids",
          "channel_ids",
          "settings",
          "extra"
        ],
        "properties": {
          "callback_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "channel_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "extra": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Value"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          },
          "repo_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Scope"
            }
          },
          "settings": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/Value"
            },
            "propertyNames": {
              "type": "string"
            }
          }
        }
      },
      "WorkspaceInvitation": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "email",
          "role",
          "token_hash",
          "invited_by",
          "expires_at",
          "created_at"
        ],
        "properties": {
          "accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "accepted_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": "string",
            "format": "uuid"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "token_hash": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceMember": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "user_id",
          "role",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "joined_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_active_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspacePendingApproval": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "requester_id",
          "request_type",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_type": {
            "$ref": "#/components/schemas/RequestType"
          },
          "requester_id": {
            "type": "string",
            "format": "uuid"
          },
          "reviewed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "reviewed_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceSettings": {
        "type": "object",
        "required": [
          "workspace_id",
          "allow_public_repos",
          "allow_member_invites",
          "require_two_factor",
          "default_repo_visibility",
          "default_branch_name",
          "issue_tracking_enabled",
          "pull_requests_enabled",
          "wiki_enabled",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "allow_member_invites": {
            "type": "boolean"
          },
          "allow_public_repos": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "default_branch_name": {
            "type": "string"
          },
          "default_repo_visibility": {
            "type": "string"
          },
          "issue_tracking_enabled": {
            "type": "boolean"
          },
          "pull_requests_enabled": {
            "type": "boolean"
          },
          "require_two_factor": {
            "type": "boolean"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "wiki_enabled": {
            "type": "boolean"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceStats": {
        "type": "object",
        "required": [
          "workspace_id",
          "members_count",
          "repos_count",
          "issues_count",
          "pull_requests_count",
          "storage_bytes",
          "bandwidth_bytes",
          "build_minutes_used",
          "updated_at"
        ],
        "properties": {
          "bandwidth_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "build_minutes_used": {
            "type": "integer",
            "format": "int64"
          },
          "issues_count": {
            "type": "integer",
            "format": "int64"
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "members_count": {
            "type": "integer",
            "format": "int64"
          },
          "pull_requests_count": {
            "type": "integer",
            "format": "int64"
          },
          "repos_count": {
            "type": "integer",
            "format": "int64"
          },
          "storage_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WorkspaceWebhook": {
        "type": "object",
        "required": [
          "id",
          "workspace_id",
          "url",
          "events",
          "active",
          "created_by",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "last_delivery_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_delivery_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "secret_ciphertext": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Authentication, registration, session and email security endpoints."
    },
    {
      "name": "User",
      "description": "User account management, profile, appearance, notification settings, SSH/GPG keys, sessions, devices, OAuth accounts, security logs, and personal access tokens."
    },
    {
      "name": "Workspaces",
      "description": "Workspace CRUD, archiving, ownership transfer, and avatar management."
    },
    {
      "name": "Repos",
      "description": "Repository management including branches, tags, releases, forks, stars, watches, members, invitations, deploy keys, webhooks, protection rules, commit statuses, and statistics."
    },
    {
      "name": "Issues",
      "description": "Issue tracking, comments, labels, milestones, assignees, events, reactions, subscribers, templates, and cross-references."
    },
    {
      "name": "Pull Requests",
      "description": "Pull request lifecycle including reviews, check runs, merge strategies, labels, assignees, events, reactions, and subscriptions."
    },
    {
      "name": "Wiki",
      "description": "Wiki page management including CRUD operations, revision history, version comparison, and page reversion."
    },
    {
      "name": "Notifications",
      "description": "User notification management including listing, reading, dismissing, deleting, subscriptions, blocks, deliveries, and templates."
    },
    {
      "name": "Git",
      "description": "Git-level operations including commits, branches, merges, rebase, blame, tree, blob, tags, and repository health/statistics endpoints."
    },
    {
      "name": "IM",
      "description": "Channel management, member administration, and category organization."
    }
  ]
}