{ "openapi": "3.1.0", "info": { "title": "gitdata api", "description": "\n## Conventions\n\n### Response envelope\nEvery JSON response uses the same envelope:\n\n| field | meaning |\n|---|---|\n| `code` | always equal to the HTTP status code |\n| `message` | human-readable result / error summary |\n| `data` | payload, `null` for errors and empty results |\n| `error` | field-level / technical detail (e.g. validation errors), may be `null` |\n| `error_code` | stable machine-readable code on 4xx (e.g. `conflict`, `rate_limited`), may be `null` |\n| `request_id` | correlation id, also returned as the `X-Request-Id` header |\n\nSuccessful `POST` creation returns `200` (not `201`); empty results use `200` with `data: null`.\n- `POST /auth/logout` is idempotent: repeating it always succeeds with `200`.\n\n### Authentication\n- `session_cookie`: opaque session carried in the `session` cookie and stored in\n Redis. `GET /auth/login` redirects to the same-origin login page;\n `POST /auth/logout` revokes the session and clears the cookie.\n\n### URL & parameter style\n- Paths are `kebab-case`, plural nouns, nesting expresses ownership.\n- Query/path/JSON field names are `snake_case`; enum values are `snake_case`.\n- All endpoints are versioned under `/api/v1`. `/api/v1/internal/*` is guarded\n by the `x-gitdata-service-key` header and is NOT documented here.\n- State-transition actions use `POST {resource}/{id}/{verb}` (close/reopen);\n idempotent whole-resource state uses `PUT` (default branch, pin, read-state);\n partial updates use `PATCH`.\n\n### Pagination\n- 唯一 offset 风格:`?limit=&offset=`(`limit` 默认 50;`offset` 上限 5000),\n 分页响应的 `data` 恒为 `{ items, total, limit, offset }`,字段均为无符号整数。\n- `limit` 为 0、超过端点上限或 `offset` 超过 5000 时返回 400\n (`error_code: bad_request`),不会静默截断。\n- 排序参数为 `?sort=&order=asc|desc`;`sort` 的取值按端点枚举校验,\n 未知值返回 400,未知参数同样返回 400。\n- chat 消息额外接受 `before_seq` / `after_seq` 作为筛选条件,响应仍是同一 `Page` 形状。\n- Git LFS 锁定列表的 `next_cursor` 是 LFS 协议字段,不适用本约定。\n\n### PATCH semantics (three-state fields)\nUpdate commands use `Option>` for clearable fields:\n- field **absent** → unchanged\n- field `null` → cleared\n- field value → set\n\nExample: `{\"milestone_id\": null}` unassigns the milestone; omitting\n`milestone_id` leaves it untouched.\n\n### 2FA\nTOTP enrollment, recovery codes and sensitive-operation verification are\nhandled by identity; GitData only proxies the account-management endpoints.\n\n### Operations\n- `GET /healthz` — liveness probe (no auth, outside `/api/v1`).\n- `GET /readyz` — readiness probe: database (primary) + redis live checks,\n rocketmq + s3 sampled every 10s, `503` when any is down.\n- Runtime metrics are pushed to the configured OTLP collector (30s interval);\n there is no scrape endpoint.\n- Cross-origin browser access is disabled by default; the API expects a\n same-origin reverse proxy. Enable `web.cors_allow_origins` to allowlist\n other origins.\n\n### Abuse controls\n- Creation endpoints are subject to per-user rolling 24h quotas\n (`[quota]` config; 0 disables). Exceeding a quota returns `429`\n with `error_code: \"rate_limited\"`.\n\n### Idempotency\n- `POST /chat/rooms/{room_id}/messages` accepts `nonce`: unique per room;\n retrying with the same nonce returns the original message instead of a duplicate.\n\n### Resource references\n- User references in responses embed a `user` object (`UserDto`) wherever a\n single person is shown; raw uuid fields are named `*_id` consistently.\n- Viewer-specific state is embedded, not fetched separately: `RepoDto.me`\n carries `starred`/`watch_mode`, `IssueDto.viewer_watch` carries the caller\n watch mode. `PUT /repos/{space}/{repo}/star|unstar` style reads do not exist.\n\n### Identifiers\n- Issues are addressable by UUID **or** board-scoped number\n (e.g. `/issues/{space}/boards/{board}/issues/123`).\n- Binary uploads use raw request bodies with a content-type header\n (e.g. `PUT /me/avatar` accepts `image/*` bytes, not base64 JSON).\n", "version": "1.0" }, "servers": [ { "url": "/api/v1" } ], "paths": { "/auth/2fa/disable": { "post": { "tags": [ "auth" ], "description": "用动态码或一枚恢复码关闭两步验证,并吊销全部恢复码。", "operationId": "totp_disable", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TotpCodeCmd" } } }, "required": true }, "responses": { "200": { "description": "two-factor disabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/2fa/enable": { "post": { "tags": [ "auth" ], "description": "用动态码与账号口令确认启用两步验证,返回一次性恢复码。", "operationId": "totp_enable", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TotpEnableCmd" } } }, "required": true }, "responses": { "200": { "description": "two-factor enabled and recovery codes issued", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RecoveryCodesResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/2fa/recovery-codes": { "get": { "tags": [ "auth" ], "description": "查看恢复码批次用量。明文只在生成时返回一次,这里不会回显。", "operationId": "recovery_codes", "responses": { "200": { "description": "recovery code usage", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RecoveryCodesResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "auth" ], "description": "校验账号口令后重建恢复码批次,返回新的一批明文。", "operationId": "regenerate_recovery_codes", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegenerateRecoveryCodesCmd" } } }, "required": true }, "responses": { "200": { "description": "recovery codes regenerated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RecoveryCodesResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/2fa/setup": { "post": { "tags": [ "auth" ], "description": "生成新的 TOTP 密钥并返回 otpauth URI,密钥明文只返回一次。", "operationId": "totp_setup", "responses": { "200": { "description": "totp secret provisioned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TotpSetupResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/2fa/status": { "get": { "tags": [ "auth" ], "description": "查询当前账号是否已启用两步验证。", "operationId": "totp_status", "responses": { "200": { "description": "two-factor status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TotpStatusResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/agreements": { "get": { "tags": [ "account" ], "description": "返回服务端配置中的协议列表及其当前版本与正文。", "operationId": "list_agreements", "responses": { "200": { "description": "agreement documents from configuration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_AgreementDoc" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/challenge": { "post": { "tags": [ "auth" ], "summary": "签发工作量证明挑战", "description": "把挑战写进当前会话并返回。客户端需要为 `context` 找出一枚满足 `difficulty`(前导零比特数)的 nonce;`pow.v1` 算法与前端求解器一致。", "operationId": "auth_challenge", "responses": { "200": { "description": "挑战已签发并写入会话", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ChallengeResponse" }, "example": { "code": 200, "data": { "context": "3xJk9Qp2mV7sLbT1rZa8nHc4wDf6YgU0", "difficulty": 16, "expires_at": 1767139500, "issued_at": 1767139200 }, "message": "success" } } } }, "500": { "description": "`internal`(挑战无法写入会话)/ `cache` / `session` / `serialization`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/login": { "post": { "tags": [ "auth" ], "summary": "口令登录", "description": "用口令登录。`identity` 可以是用户名、邮箱(大小写不敏感)或用户编号,`password_hash` 是客户端先算好的口令摘要,工作量证明的载荷必须是 `identity`。账号启用了多因子时返回 `mfa_required: true` 与 `challenge`,此时会话尚未绑定,需再调 `/api/v1/auth/login/verify`。", "operationId": "auth_login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserLoginRequest" } } }, "required": true }, "responses": { "200": { "description": "登录成功;`mfa_required` 为真时还需二次验证", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserLoginResponse" }, "example": { "code": 200, "data": { "challenge": null, "displayname": "Ada", "mfa_required": false, "user_id": 1024, "username": "ada" }, "message": "success" } } } }, "400": { "description": "工作量证明过期、载荷不匹配或请求不合法(`expired`、`invalid_proof`、`invalid_payload`、`malformed_request`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "expired", "message": "challenge expired" } } } }, "401": { "description": "身份或口令不正确(`invalid_credentials`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_credentials", "message": "invalid credentials" } } } }, "403": { "description": "账号被禁止登录,原因见 `message`(`login_forbidden`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "login_forbidden", "message": "account is banned" } } } }, "429": { "description": "失败次数超出配额(`rate_limited`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "rate_limited", "message": "too many attempts" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`cache`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/login/code": { "post": { "tags": [ "auth" ], "summary": "发送邮箱登录验证码", "description": "向账号邮箱发送 6 位登录验证码,`expires_in_secs` 为有效期。工作量证明的载荷必须是 `email`。同一账号的发码间隔受 `email_code_rate_limit_secs` 限制。", "operationId": "auth_login_code", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginCodeRequest" } } }, "required": true }, "responses": { "200": { "description": "验证码已发送", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LoginCodeResponse" }, "example": { "code": 200, "data": { "expires_in_secs": 600 }, "message": "success" } } } }, "400": { "description": "邮箱格式不合法或工作量证明过期、载荷不匹配(`invalid_email`、`expired`、`invalid_proof`、`invalid_payload`、`malformed_request`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_email", "message": "invalid email address" } } } }, "401": { "description": "邮箱未注册或账号不可用(`invalid_credentials`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_credentials", "message": "invalid credentials" } } } }, "403": { "description": "账号被禁止登录,原因见 `message`(`login_forbidden`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "login_forbidden", "message": "account is banned" } } } }, "429": { "description": "发码过于频繁(`rate_limited`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "rate_limited", "message": "too many requests" } } } }, "500": { "description": "服务端故障,含邮件发送失败(`internal`、`database`、`cache`、`session`、`email`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/login/code/verify": { "post": { "tags": [ "auth" ], "summary": "邮箱验证码换会话", "description": "用邮箱登录验证码换会话。工作量证明的载荷必须是 `email`。验证码一旦核对通过即作废,连续输错 `max_verify_attempts` 次后需重新申请。账号启用了多因子时返回 `mfa_required: true` 与 `challenge`。", "operationId": "auth_login_code_verify", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginCodeVerifyRequest" } } }, "required": true }, "responses": { "200": { "description": "登录成功;`mfa_required` 为真时还需二次验证", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserLoginResponse" }, "example": { "code": 200, "data": { "challenge": null, "displayname": "Ada", "mfa_required": false, "user_id": 1024, "username": "ada" }, "message": "success" } } } }, "400": { "description": "验证码不正确或已过期,或邮箱格式、工作量证明不合法(`invalid_email_code`、`invalid_email`、`expired`、`invalid_proof`、`invalid_payload`、`malformed_request`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_email_code", "message": "invalid email code" } } } }, "401": { "description": "邮箱未注册或账号不可用(`invalid_credentials`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_credentials", "message": "invalid credentials" } } } }, "403": { "description": "账号被禁止登录,原因见 `message`(`login_forbidden`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "login_forbidden", "message": "account is banned" } } } }, "429": { "description": "验证码尝试次数超限或请求过频(`email_code_attempts_exceeded`、`rate_limited`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "email_code_attempts_exceeded", "message": "too many attempts" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`cache`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/login/verify": { "post": { "tags": [ "auth" ], "summary": "二次验证换会话", "description": "用 6 位 TOTP 动态码或一枚未使用的恢复码完成二次验证并绑定会话。`challenge` 必须与 `/api/v1/auth/login` 或 `/api/v1/auth/login/code/verify` 返回的一致,挑战有效期 300 秒,同一动态码时间步不能重复使用,恢复码用掉即作废。", "operationId": "auth_login_verify", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginVerifyRequest" } } }, "required": true }, "responses": { "200": { "description": "登录成功,会话已绑定", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserLoginResponse" }, "example": { "code": 200, "data": { "challenge": null, "displayname": "Ada", "mfa_required": false, "user_id": 1024, "username": "ada" }, "message": "success" } } } }, "400": { "description": "挑战过期或对不上、动态码错误、动态码时间步已用过、恢复码无效(`expired`、`malformed_request`、`totp_code_invalid`、`totp_step_reused`、`recovery_code_invalid`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "totp_code_invalid", "message": "invalid totp code" } } } }, "401": { "description": "会话里没有待验证挑战、账号不可用或多因子记录已被撤销(`unauthenticated`、`invalid_credentials`、`mfa_required`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "mfa_required", "message": "multi-factor authentication required" } } } }, "403": { "description": "账号被禁止登录,原因见 `message`(`login_forbidden`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "login_forbidden", "message": "account is banned" } } } }, "429": { "description": "尝试次数超限或恢复码已用尽(`rate_limited`、`recovery_codes_exhausted`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "rate_limited", "message": "too many attempts" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`cache`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/logout": { "post": { "tags": [ "auth" ], "summary": "登出", "description": "销毁当前会话,并清掉该用户的 `/api/v1/auth/me` 缓存。匿名调用同样成功,此时 `user_id` 为 `null`。", "operationId": "auth_logout", "responses": { "200": { "description": "会话已销毁", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LogoutResponse" }, "example": { "code": 200, "data": { "user_id": 1024 }, "message": "success" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`cache`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/me": { "get": { "tags": [ "auth" ], "summary": "当前登录用户", "description": "通过会话 Cookie 返回用户自述信息。结果在服务端缓存 300 秒,每第 5 次访问回源刷新;登出与改密会主动失效该缓存。", "operationId": "auth_me", "responses": { "200": { "description": "当前登录用户", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MeResponse" }, "example": { "code": 200, "data": { "avatar_url": "https://cdn.example.com/avatar/ada.png", "created_at": "2025-11-20T02:15:00Z", "displayname": "Ada", "email": "ada@example.com", "email_verified_at": "2026-01-05T08:30:00Z", "is_admin": false, "user_id": 1024, "username": "ada", "version": 3 }, "message": "success" } } } }, "401": { "description": "会话未绑定用户,或账号已被删除(`unauthenticated`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "unauthenticated", "message": "authentication required" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`cache`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/password/change": { "post": { "tags": [ "auth" ], "description": "修改当前账号口令,成功后吊销除当前会话以外的全部会话。", "operationId": "change_password", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordCmd" } } }, "required": true }, "responses": { "200": { "description": "password changed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/auth/password/reset": { "post": { "tags": [ "auth" ], "summary": "申请密码重置", "description": "校验工作量证明(payload = 邮箱的 UTF-8 字节)后,作废该用户其余未消费的重置令牌,签发新令牌(长度 `reset_token_bytes`,有效期 `reset_token_ttl_secs`),库内只存 `sha256_hex(token)` 且 `hash_key_id = \"sha256-v1\"`,同时把摘要写入缓存键 `auth:code:reset:{email}`,发信限流键 `auth:rate:reset:{email}`。", "operationId": "auth_password_reset_request", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PasswordResetRequest" } } }, "required": true }, "responses": { "200": { "description": "申请已受理;是否真的发信不对外披露", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PasswordResetResponse" }, "example": { "code": 200, "data": { "expires_in_secs": 1800 }, "message": "success" } } } }, "400": { "description": "`invalid_email` / `expired` / `invalid_payload`(payload 与邮箱不一致)/ `invalid_proof`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_email", "message": "email is invalid" } } } }, "429": { "description": "`rate_limited`(同一邮箱申请过于频繁)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "rate_limited", "message": "too many requests, retry after 60s" } } } }, "500": { "description": "`email`(投递失败)/ `database` / `cache` / `session` / `serialization` / `internal`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/password/reset/confirm": { "post": { "tags": [ "auth" ], "summary": "确认密码重置", "description": "校验工作量证明(payload = `token` 的 UTF-8 字节)与缓存键 `auth:code:reset:{email}`(尝试上限 `max_verify_attempts`,错误计入 `invalid_email_code`)后,条件消费数据库令牌行(`consumed_at` 单次占用),Argon2 重哈希新口令,更新 `password_hash`/`password_updated_at`/`password_must_change`/`security_version + 1`,作废其余令牌并记 `PasswordChange` 审计事件。", "operationId": "auth_password_reset", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PasswordResetConfirmRequest" } } }, "required": true }, "responses": { "200": { "description": "口令已改写;旧口令与其余重置令牌失效", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PasswordResetConfirmResponse" }, "example": { "code": 200, "data": { "user_id": 1234567 }, "message": "success" } } } }, "400": { "description": "`invalid_reset_token`(令牌不存在/已消费/已作废/已过期/账号不可用或凭据代数不匹配)/ `invalid_email_code`(缓存内摘要不匹配或已过期)/ `invalid_password` / `expired` / `invalid_payload` / `invalid_proof`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_reset_token", "message": "password reset token is invalid" } } } }, "429": { "description": "`email_code_attempts_exceeded`(令牌尝试次数用尽)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "email_code_attempts_exceeded", "message": "too many invalid email verification attempts" } } } }, "500": { "description": "`password_hash`(口令重哈希失败)/ `database` / `cache` / `session` / `serialization` / `internal`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/register": { "post": { "tags": [ "auth" ], "summary": "提交注册", "description": "校验工作量证明(payload = 用户名的 UTF-8 字节)、用户名/展示名/出生日期/邮箱、邮箱验证码(键 `auth:code:register:{email}`,尝试上限 `max_verify_attempts`)后,Argon2 重哈希口令并创建用户与初始档案。成功后写会话(user_id、security_version、renew)并记审计事件。", "operationId": "auth_register", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "注册成功且已登录", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserRegisterResponse" }, "example": { "code": 200, "data": { "displayname": "Alice", "user_id": 1234567, "username": "alice" }, "message": "success" } } } }, "400": { "description": "`invalid_username` / `invalid_displayname` / `invalid_email` / `invalid_birth_date` / `invalid_password` / `invalid_email_code`(验证码错误或已过期)/ `expired` / `invalid_payload` / `invalid_proof`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_email_code", "message": "email verification code is invalid" } } } }, "403": { "description": "`under_minimum_age`(未满最小年龄)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "under_minimum_age", "message": "you must be at least 13 years old" } } } }, "409": { "description": "`username_taken` / `email_taken`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "username_taken", "message": "username is already taken" } } } }, "429": { "description": "`email_code_attempts_exceeded`(验证码尝试次数用尽)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "email_code_attempts_exceeded", "message": "too many invalid email verification attempts" } } } }, "500": { "description": "`password_hash`(口令重哈希失败)/ `database` / `cache` / `session` / `serialization` / `internal`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/register/code": { "post": { "tags": [ "auth" ], "summary": "发送注册验证码", "description": "校验工作量证明(payload = 邮箱的 UTF-8 字节)与邮箱格式后,把 6 位验证码写入缓存并寄出。缓存键 `auth:code:register:{email}`,有效期由 `verify_code_ttl_secs` 决定,发码限流键 `auth:rate:register:{email}`。", "operationId": "auth_register_code", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterCodeRequest" } } }, "required": true }, "responses": { "200": { "description": "验证码已写入缓存并寄出", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RegisterCodeResponse" }, "example": { "code": 200, "data": { "expires_in_secs": 600 }, "message": "success" } } } }, "400": { "description": "`invalid_email`(邮箱格式)/ `expired`(挑战过期)/ `invalid_payload`(payload 与邮箱不一致)/ `invalid_proof`(未满足难度)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "invalid_email", "message": "email is invalid" } } } }, "409": { "description": "`email_taken`(邮箱已注册)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "email_taken", "message": "email is already taken" } } } }, "429": { "description": "`rate_limited`(同一邮箱发码过于频繁)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "rate_limited", "message": "too many requests, retry after 60s" } } } }, "500": { "description": "`email`(投递失败)/ `cache` / `session` / `serialization` / `internal`", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/ssh-keys": { "get": { "tags": [ "auth" ], "summary": "列示 SSH 公钥", "description": "按创建时间倒序返回当前账号的公钥,含已吊销与已过期的记录。使用 `limit` / `offset` 分页;`limit` 必须在 1..=100、`offset` 不得超过 5000,越界返回 400。", "operationId": "auth_ssh_key_list", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "公钥列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_SshKeySummary" }, "example": { "code": 200, "data": { "items": [ { "algorithm": "ed25519", "created_at": "2026-01-02T03:04:05Z", "description": "笔记本", "expires_at": null, "fingerprint": "SHA256:9pQ2mLk1v3sT6yZx8cV0bN4mR7wQ2eH5jK9aD1sF3gU", "id": "018f2b1c-4d5e-7f80-9a1b-2c3d4e5f6072", "last_used_at": null, "name": "thinkpad", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9kQ2mXv7Tb1sYz8cV0bN4mR7wQ2eH5jK9aD1sF3gU thinkpad", "revoked_at": null } ], "limit": 50, "offset": 0, "total": 1 }, "message": "success" } } } }, "401": { "description": "会话未绑定账号(`unauthenticated`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "unauthenticated", "message": "authentication required" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } }, "post": { "tags": [ "auth" ], "summary": "添加 SSH 公钥", "description": "名称 1~64 字符、备注最长 255 字符,公钥 32~8192 字节且必须是受支持的单行 OpenSSH 公钥,`expires_at` 必须晚于当前时间。重复公钥(指纹唯一)返回 `ssh_key_taken`。添加成功记 `PublicKeyAdded` 审计事件。", "operationId": "auth_ssh_key_add", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SshKeyAddRequest" } } }, "required": true }, "responses": { "200": { "description": "公钥已登记", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_SshKeySummary" }, "example": { "code": 200, "data": { "algorithm": "ed25519", "created_at": "2026-01-02T03:04:05Z", "description": "笔记本", "expires_at": null, "fingerprint": "SHA256:9pQ2mLk1v3sT6yZx8cV0bN4mR7wQ2eH5jK9aD1sF3gU", "id": "018f2b1c-4d5e-7f80-9a1b-2c3d4e5f6072", "last_used_at": null, "name": "thinkpad", "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9kQ2mXv7Tb1sYz8cV0bN4mR7wQ2eH5jK9aD1sF3gU thinkpad", "revoked_at": null }, "message": "success" } } } }, "400": { "description": "名称、备注、公钥或过期时间不合法(`ssh_key_name_invalid`、`malformed_request`、`ssh_key_invalid`、`invalid_expiry`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "ssh_key_invalid", "message": "public key is invalid" } } } }, "401": { "description": "会话未绑定账号,或账号已删除 / 不允许使用(`unauthenticated`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "unauthenticated", "message": "authentication required" } } } }, "409": { "description": "同一把公钥已经登记过(`ssh_key_taken`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "ssh_key_taken", "message": "public key is already registered" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/auth/ssh-keys/{key_id}": { "delete": { "tags": [ "auth" ], "summary": "吊销 SSH 公钥", "description": "把公钥标记为已吊销,记录保留不硬删;重复调用幂等。公钥不存在或不属于当前账号返回 `ssh_key_not_found`。吊销成功记 `PublicKeyRemoved` 审计事件,并递增 `security_version` 让该账号既有的访问令牌一并失效。`key_id` 不是合法 UUID 时由 actix-web 的路径提取器直接返回 400。", "operationId": "auth_ssh_key_delete", "parameters": [ { "name": "key_id", "in": "path", "description": "公钥编号", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已吊销;重复调用同样返回成功", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": 200, "data": null, "message": "success" } } } }, "401": { "description": "会话未绑定账号(`unauthenticated`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "unauthenticated", "message": "authentication required" } } } }, "404": { "description": "公钥不存在或不属于当前账号(`ssh_key_not_found`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "ssh_key_not_found", "message": "ssh key does not exist" } } } }, "500": { "description": "服务端故障(`internal`、`database`、`session`、`serialization`)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" }, "example": { "code": "internal", "message": "internal server error" } } } } } } }, "/chat/attachments": { "post": { "tags": [ "chat" ], "description": "为一次附件上传预留记录并返回预签名 PUT 地址。", "operationId": "create_attachment", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAttachmentCmd" } } }, "required": true }, "responses": { "200": { "description": "upload intent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UploadIntentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "too many pending attachments", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/attachments/{attachment_id}": { "get": { "tags": [ "chat" ], "description": "读取附件元数据。", "operationId": "get_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "attachment metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AttachmentDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/attachments/{attachment_id}/file": { "get": { "tags": [ "chat" ], "description": "以安全响应头流式下载聊天附件。默认返回上传原图(下载语义不变),`?variant=preview` 返回压缩预览图;没有可用预览图时同样返回原图。", "operationId": "download_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "variant", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ImageVariant" } ] } } ], "responses": { "200": { "description": "file stream" }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/attachments/{attachment_id}/finalize": { "post": { "tags": [ "chat" ], "description": "确认对象已上传,校验大小与类型,并生成压缩预览图(失败时回退原图)。", "operationId": "finalize_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinalizeAttachmentCmd" } } }, "required": true }, "responses": { "200": { "description": "attachment finalized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AttachmentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/dms": { "get": { "tags": [ "chat" ], "description": "列出当前用户仍有效的私聊会话及其未读信息。", "operationId": "list_dms", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "my dms", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_DmDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "打开与指定用户的私聊会话;已有会话则恢复,新会话则创建。", "operationId": "open_dm", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenDmCmd" } } }, "required": true }, "responses": { "200": { "description": "dm opened", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DmDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "creation quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/dms/{room_id}": { "delete": { "tags": [ "chat" ], "description": "将当前用户从指定私聊会话中移除,不再接收该会话消息。", "operationId": "close_dm", "parameters": [ { "name": "room_id", "in": "path", "description": "dm room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "dm closed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/drafts": { "get": { "tags": [ "chat" ], "description": "分页列出当前用户保存的全部聊天草稿。", "operationId": "list_my_drafts", "responses": { "200": { "description": "my drafts", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_DraftDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/hooks/{token}": { "post": { "tags": [ "chat" ], "description": "凭路径中的 Webhook 令牌以创建者身份向房间发送消息。", "operationId": "post_via_webhook", "parameters": [ { "name": "token", "in": "path", "description": "webhook token", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookPostCmd" } } }, "required": true }, "responses": { "200": { "description": "message posted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "invalid token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/livekit/webhook": { "post": { "tags": [ "chat" ], "summary": "LiveKit webhook:无会话,用 api_key/api_secret 验签 Authorization 与 body sha256。", "description": "LiveKit 事件回调(签名校验,无会话)。", "operationId": "livekit_webhook", "responses": { "200": { "description": "ok", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "invalid signature", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/presence": { "put": { "tags": [ "chat" ], "description": "更新当前用户的在线状态、离开状态或隐身状态。", "operationId": "set_presence", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetPresenceCmd" } } }, "required": true }, "responses": { "200": { "description": "presence updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PresenceDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/reminders": { "get": { "tags": [ "chat" ], "description": "列出当前用户尚未执行的提醒计划。", "operationId": "list_reminders", "responses": { "200": { "description": "pending reminders", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReminderDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/reminders/{reminder_id}": { "delete": { "tags": [ "chat" ], "description": "取消当前用户的一条待执行提醒。", "operationId": "cancel_reminder", "parameters": [ { "name": "reminder_id", "in": "path", "description": "reminder id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "reminder cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "修改待执行提醒的时间或备注。", "operationId": "update_reminder", "parameters": [ { "name": "reminder_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateReminderCmd" } } }, "required": true }, "responses": { "200": { "description": "reminder updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReminderDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}": { "get": { "tags": [ "chat" ], "description": "读取单个房间的详情及当前用户未读数。", "operationId": "get_room", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoomBriefDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "软删除聊天频道并停止其对外可见。", "operationId": "delete_room", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "room or space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "更新房间名称、主题、隐私、限速或排序等属性。", "operationId": "update_room", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoomCmd" } } }, "required": true }, "responses": { "200": { "description": "room updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoomBriefDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/bookmarks": { "get": { "tags": [ "chat" ], "description": "按排序位置读取指定房间的书签列表。", "operationId": "list_bookmarks", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "bookmark list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_BookmarkDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "在可读取的房间中创建链接书签或表情书签。", "operationId": "create_bookmark", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBookmarkCmd" } } }, "required": true }, "responses": { "200": { "description": "bookmark created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BookmarkDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/bookmarks/{bookmark_id}": { "delete": { "tags": [ "chat" ], "description": "删除指定房间书签;仅作者或空间管理员可操作。", "operationId": "delete_bookmark", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "bookmark_id", "in": "path", "description": "bookmark id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "bookmark deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "更新书签的标题、链接、表情或排序位置;仅作者或空间管理员可改。", "operationId": "update_bookmark", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "bookmark_id", "in": "path", "description": "bookmark id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBookmarkCmd" } } }, "required": true }, "responses": { "200": { "description": "bookmark updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BookmarkDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/draft": { "get": { "tags": [ "chat" ], "description": "读取当前用户在指定房间或话题中的输入草稿。", "operationId": "get_draft", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "thread_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } } ], "responses": { "200": { "description": "draft", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Option_DraftDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "chat" ], "description": "保存房间或话题输入草稿;提交空内容会清除对应草稿。", "operationId": "upsert_draft", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertDraftCmd" } } }, "required": true }, "responses": { "200": { "description": "draft saved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DraftDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "删除当前用户在指定房间或话题中的输入草稿。", "operationId": "delete_draft", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "thread_id", "in": "query", "description": "thread scope", "required": false, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "draft deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "no draft", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages": { "get": { "tags": [ "chat" ], "description": "按房间序号过滤并分页读取消息;has_more 可用 offset + items.len() < total 判断。", "operationId": "list_messages", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "before_seq", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } }, { "name": "after_seq", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "thread_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "author_id", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } } ], "responses": { "200": { "description": "message page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MessageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "向房间发送消息。", "operationId": "send_message", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendMessageCmd" } } }, "required": true }, "responses": { "200": { "description": "message sent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/bulk-delete": { "post": { "tags": [ "chat" ], "description": "批量软删除同一房间内最多 100 条有权删除的消息。", "operationId": "bulk_delete_messages", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkDeleteCmd" } } }, "required": true }, "responses": { "200": { "description": "messages deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}": { "get": { "tags": [ "chat" ], "description": "读取指定房间中单条未删除消息的详情。", "operationId": "get_message", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "message detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "软删除指定消息并广播删除事件;作者或空间管理员可操作。", "operationId": "delete_message", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "message deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "编辑自己或空间管理员有权修改的消息,并保存历史版本。", "operationId": "update_message", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMessageCmd" } } }, "required": true }, "responses": { "200": { "description": "message updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/forward": { "post": { "tags": [ "chat" ], "description": "将源房间消息转发到目标房间,并按发送消息权限执行校验。", "operationId": "forward_message", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForwardMessageCmd" } } }, "required": true }, "responses": { "200": { "description": "message forwarded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/history": { "get": { "tags": [ "chat" ], "description": "读取指定消息历次编辑保存的内容快照。", "operationId": "list_message_history", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "edit history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_MessageEditDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/pin": { "put": { "tags": [ "chat" ], "description": "置顶房间消息或取消置顶,并同步房间实时事件。", "operationId": "set_message_pin", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PinCmd" } } }, "required": true }, "responses": { "200": { "description": "pin updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MessageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/reactions": { "get": { "tags": [ "chat" ], "description": "列出指定消息上全部用户的表情回应明细。", "operationId": "list_reactions", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "reaction users", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReactionUserDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/reactions/@me": { "put": { "tags": [ "chat" ], "description": "为消息添加当前用户的表情回应,并返回聚合结果。", "operationId": "add_reaction", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionCmd" } } }, "required": true }, "responses": { "200": { "description": "reaction added", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReactionAggDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "撤回当前用户在消息上指定的表情回应。", "operationId": "remove_reaction", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReactionCmd" } } }, "required": true }, "responses": { "200": { "description": "reaction removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReactionAggDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/reminders": { "post": { "tags": [ "chat" ], "description": "为指定消息创建未来时间的用户提醒。", "operationId": "create_reminder", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReminderCmd" } } }, "required": true }, "responses": { "200": { "description": "reminder created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReminderDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/messages/{message_id}/threads": { "post": { "tags": [ "chat" ], "description": "基于指定根消息创建房间话题;已存在时返回既有线程。", "operationId": "create_thread", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "message_id", "in": "path", "description": "root message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateThreadCmd" } } }, "required": true }, "responses": { "200": { "description": "thread created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ThreadDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/outbound-webhooks": { "get": { "tags": [ "chat" ], "description": "列出房间的出站 Webhook(不返回密钥)。", "operationId": "list_outbound_webhooks", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "outbound webhook list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_OutboundWebhookDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "创建出站 Webhook(房间消息事件回调),一次性返回签名密钥。", "operationId": "create_outbound_webhook", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOutboundWebhookCmd" } } }, "required": true }, "responses": { "200": { "description": "outbound webhook created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OutboundWebhookSecretDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/outbound-webhooks/{webhook_id}": { "delete": { "tags": [ "chat" ], "description": "删除出站 Webhook 并清理待投递事件。", "operationId": "delete_outbound_webhook", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "outbound webhook deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "更新出站 Webhook 的名称、地址或启用状态。", "operationId": "update_outbound_webhook", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOutboundWebhookCmd" } } }, "required": true }, "responses": { "200": { "description": "outbound webhook updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OutboundWebhookDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/pins": { "get": { "tags": [ "chat" ], "description": "返回房间内当前置顶且未删除的消息列表。", "operationId": "list_pins", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "pinned messages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MessageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/read-state": { "get": { "tags": [ "chat" ], "description": "读取当前用户在指定房间的已读位置与未读计数。", "operationId": "get_read_state", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "read state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReadStateDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "chat" ], "description": "按消息 ID、序号或房间末尾消息更新当前用户的已读游标。", "operationId": "mark_read", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkReadCmd" } } }, "required": true }, "responses": { "200": { "description": "read state updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReadStateDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/settings": { "get": { "tags": [ "chat" ], "description": "读取当前用户针对单个房间的通知与显示设置。", "operationId": "get_room_setting", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room setting", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoomSettingDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "chat" ], "description": "更新当前用户的房间通知级别、收藏、隐藏或免打扰设置。", "operationId": "update_room_setting", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoomSettingCmd" } } }, "required": true }, "responses": { "200": { "description": "room setting updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoomSettingDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/threads": { "get": { "tags": [ "chat" ], "description": "分页列出房间话题,可按归档状态过滤。", "operationId": "list_threads", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "archived", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "thread page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_ThreadDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/hands": { "get": { "tags": [ "chat" ], "description": "舞台举手列表;主持人看到全部申请,普通成员只看到自己与已通过者。", "operationId": "list_hands", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "hands", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceHandsDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "在舞台频道举手申请发言。", "operationId": "raise_hand", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "hand raised", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_HandDto" } } } }, "400": { "description": "not a stage channel", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "already able to speak", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/hands/@me": { "delete": { "tags": [ "chat" ], "description": "撤回自己的举手申请。", "operationId": "cancel_hand", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "hand cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "an approved speaker must be revoked by a moderator", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/hands/{user_id}/approve": { "post": { "tags": [ "chat" ], "description": "主持人批准发言:翻转该成员 can_publish,无需重连。", "operationId": "approve_hand", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "approved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceModerationDto" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "hand not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/hands/{user_id}/deny": { "post": { "tags": [ "chat" ], "description": "主持人拒绝发言申请。", "operationId": "deny_hand", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "denied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceModerationDto" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/hands/{user_id}/revoke": { "post": { "tags": [ "chat" ], "description": "主持人收回某人的发言权:can_publish=false 并静音其麦克风。", "operationId": "revoke_hand", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceModerationDto" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/layout": { "get": { "tags": [ "chat" ], "description": "读取房间内共享的参与者窗口布局(坐标按画布宽高归一化)。", "operationId": "get_voice_layout", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "shared layout", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceLayoutDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "chat" ], "description": "按 key 合并保存参与者窗口布局并广播给房间内所有人:请求只带自己改动的那些格子(收回的列在 removed 里),越界坐标会被夹回画布内。", "operationId": "save_voice_layout", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoiceLayoutPatchDto" } } }, "required": true }, "responses": { "200": { "description": "layout saved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceLayoutSavedDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/participants": { "get": { "tags": [ "chat" ], "description": "以 LiveKit 实时状态为准返回通话参与者,并回写 Redis 在场记录。", "operationId": "voice_participants", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "participants", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_VoiceParticipantDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/participants/{user_id}": { "delete": { "tags": [ "chat" ], "description": "主持人把某人移出通话;该用户可以再次加入。", "operationId": "kick_participant", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceModerationDto" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/participants/{user_id}/mute": { "post": { "tags": [ "chat" ], "description": "主持人强制静音或解除静音某人的麦克风(?muted=false 解除)。", "operationId": "moderate_mute", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "muted", "in": "query", "description": "false to unmute", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "moderated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceModerationDto" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/recording/start": { "post": { "tags": [ "chat" ], "description": "录制预留接口;[livekit].recording_enabled=false 时返回 400。", "operationId": "start_recording", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "recording started", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceRecordingDto" } } } }, "400": { "description": "recording is not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/recording/stop": { "post": { "tags": [ "chat" ], "description": "停止录制(预留接口)。", "operationId": "stop_recording", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "recording stopped", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceRecordingDto" } } } }, "400": { "description": "recording is not enabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/voice/token": { "post": { "tags": [ "chat" ], "description": "为当前用户签发进入该语音频道的 LiveKit 令牌;房间满员返回 409。", "operationId": "voice_token", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "voice token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceTokenDto" } } } }, "400": { "description": "not a voice channel or livekit disabled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "room is full", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/webhooks": { "get": { "tags": [ "chat" ], "description": "列出房间 Webhook 的元数据,但不返回令牌。", "operationId": "list_webhooks", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "webhook list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_WebhookDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "空间管理员为房间创建 Webhook,并一次性返回调用令牌。", "operationId": "create_webhook", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhookCmd" } } }, "required": true }, "responses": { "200": { "description": "webhook created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_WebhookSecretDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "creation quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/rooms/{room_id}/webhooks/{webhook_id}": { "delete": { "tags": [ "chat" ], "description": "删除房间下的指定 Webhook。", "operationId": "delete_webhook", "parameters": [ { "name": "room_id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "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/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "更新 Webhook 名称或启用状态。", "operationId": "update_webhook", "parameters": [ { "name": "room_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWebhookCmd" } } }, "required": true }, "responses": { "200": { "description": "webhook updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_WebhookDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/emojis": { "get": { "tags": [ "chat" ], "description": "返回指定空间可用的自定义表情列表。", "operationId": "list_emojis", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "emoji list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_EmojiDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "空间管理员上传并登记一个新的自定义表情。", "operationId": "upload_emoji", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadEmojiCmd" } } }, "required": true }, "responses": { "200": { "description": "emoji created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_EmojiDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/emojis/{emoji_id}": { "get": { "tags": [ "chat" ], "description": "读取单个空间自定义表情的元数据。", "operationId": "get_emoji", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "emoji", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_EmojiDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "空间管理员删除空间自定义表情及对应存储对象。", "operationId": "delete_emoji", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "description": "emoji id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "emoji deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/emojis/{emoji_id}/image": { "get": { "tags": [ "chat" ], "description": "返回空间自定义表情的二进制图片内容。", "operationId": "emoji_image", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "emoji_id", "in": "path", "description": "emoji id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "emoji image" }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/presences": { "get": { "tags": [ "chat" ], "description": "返回指定空间活跃成员及其在线状态。", "operationId": "list_space_presences", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "space presences", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PresenceDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/read-states": { "get": { "tags": [ "chat" ], "description": "汇总当前用户在一个空间内可见房间的未读状态。", "operationId": "list_space_read_states", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "space read states", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_SpaceReadStates" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/rooms": { "get": { "tags": [ "chat" ], "description": "列出空间内可见频道,并附带未读、成员和偏好信息。", "operationId": "list_space_rooms", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list rooms", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_RoomBriefDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "chat" ], "description": "在空间下创建聊天频道;公开频道会自动加入全部活跃成员。", "operationId": "create_room", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRoomCmd" } } }, "required": true }, "responses": { "200": { "description": "room created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoomDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "room name conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "creation quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/spaces/{space_name}/voice-states": { "get": { "tags": [ "chat" ], "description": "侧栏用:该空间下每个语音/舞台频道当前在线人数。", "operationId": "voice_space_states", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "voice states", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceSpaceStatesDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/threads": { "get": { "tags": [ "chat" ], "description": "列出当前用户参与的最近话题。", "operationId": "list_my_threads", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "my threads", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_ThreadDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/threads/{thread_id}": { "get": { "tags": [ "chat" ], "description": "读取指定话题的标题、回复计数和参与状态。", "operationId": "get_thread", "parameters": [ { "name": "thread_id", "in": "path", "description": "thread id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "thread detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ThreadDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "chat" ], "description": "话题所有者或空间管理员重命名、归档或锁定话题。", "operationId": "update_thread", "parameters": [ { "name": "thread_id", "in": "path", "description": "thread id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateThreadCmd" } } }, "required": true }, "responses": { "200": { "description": "thread updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ThreadDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/threads/{thread_id}/members/@me": { "put": { "tags": [ "chat" ], "description": "让当前用户关注话题并设置通知级别。", "operationId": "follow_thread", "parameters": [ { "name": "thread_id", "in": "path", "description": "thread id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadMemberCmd" } } }, "required": true }, "responses": { "200": { "description": "followed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "chat" ], "description": "取消当前用户的话题关注并减少参与者计数。", "operationId": "unfollow_thread", "parameters": [ { "name": "thread_id", "in": "path", "description": "thread id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "unfollowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/threads/{thread_id}/read-state": { "put": { "tags": [ "chat" ], "description": "更新当前用户在指定话题中的已读游标。", "operationId": "mark_thread_read", "parameters": [ { "name": "thread_id", "in": "path", "description": "thread id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkThreadReadCmd" } } }, "required": true }, "responses": { "200": { "description": "thread marked read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/users/{user_id}/presence": { "get": { "tags": [ "chat" ], "description": "读取指定用户的在线状态;仅在可见关系成立时返回。", "operationId": "get_presence", "parameters": [ { "name": "user_id", "in": "path", "description": "user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "presence", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PresenceDto" } } } }, "401": { "description": "unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/chat/voice/config": { "get": { "tags": [ "chat" ], "description": "语音功能的搭接参数;未启用时 enabled=false,前端隐藏入口。", "operationId": "voice_config", "responses": { "200": { "description": "voice config", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VoiceConfigDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/attachments": { "post": { "tags": [ "issues" ], "description": "为一次工单附件上传预留记录并返回预签名 PUT 地址;上传完成后调用 finalize。", "operationId": "create_issue_attachment", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateIssueAttachmentCmd" } } }, "required": true }, "responses": { "200": { "description": "upload intent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueUploadIntentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "too many pending uploads", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/attachments/{attachment_id}": { "delete": { "tags": [ "issues" ], "description": "删除一个工单附件(含对象存储里的文件);只有上传者本人可以删除。", "operationId": "delete_issue_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "attachment deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/attachments/{attachment_id}/file": { "get": { "tags": [ "issues" ], "description": "下载工单附件;上传者本人或可读该议题的成员可以访问。", "operationId": "download_issue_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "file stream" }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/attachments/{attachment_id}/finalize": { "post": { "tags": [ "issues" ], "description": "确认附件对象已上传并校验真实大小与类型;只有上传者本人可以 finalize。", "operationId": "finalize_issue_attachment", "parameters": [ { "name": "attachment_id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "attachment finalized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueAttachmentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "already finalized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards": { "get": { "tags": [ "issues" ], "description": "分页列出调用者可见的看板,并统计开放和已关闭议题数量。", "operationId": "list_boards", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list boards", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_BoardDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "在空间内创建议题看板,并同步创建其目录树节点。", "operationId": "create_board", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBoardCmd" } } }, "required": true }, "responses": { "200": { "description": "create board", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BoardDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}": { "get": { "tags": [ "issues" ], "description": "读取指定看板的详情及当前议题完成统计。", "operationId": "get_board", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "get board", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BoardDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "删除看板并级联清除其议题、评论、事件、依赖、里程碑和目录节点。", "operationId": "delete_board", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete board", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "更新看板名称、编号前缀、图标或描述,并同步目录节点元数据。", "operationId": "update_board", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBoardCmd" } } }, "required": true }, "responses": { "200": { "description": "update board", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BoardDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues": { "get": { "tags": [ "issues" ], "description": "按状态、作者、里程碑、标签、指派人、优先级或关键字分页查询议题。", "operationId": "list_issues", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "state", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueState" } ] } }, { "name": "author_id", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } }, { "name": "milestone_id", "in": "query", "description": "One id or a comma-separated id list (`a,b`); `none` matches issues\nwithout a milestone. Any of the listed values matches.", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "label_id", "in": "query", "description": "One id or a comma-separated id list (`a,b`); matches any of them.", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "assignee_id", "in": "query", "description": "One id or a comma-separated id list (`a,b`); matches any of them.", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "priority", "in": "query", "description": "One priority or a comma-separated list (`high,urgent`).", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "sort", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueSort" } ] } }, { "name": "order", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list issues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_IssueListItemDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "在看板下创建议题,分配编号与标签、指派成员并处理 @提及通知。", "operationId": "create_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateIssueCmd" } } }, "required": true }, "responses": { "200": { "description": "create issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "creation quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/bulk": { "post": { "tags": [ "issues" ], "description": "批量关闭或重新打开最多 100 个有权处理的议题。", "operationId": "bulk_issues", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkIssuesCmd" } } }, "required": true }, "responses": { "200": { "description": "bulk result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BulkResultDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}": { "get": { "tags": [ "issues" ], "description": "按议题 UUID 或看板内编号读取详情及当前用户关注状态。", "operationId": "get_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "删除议题并级联清除评论、标签、成员、依赖、工时和历史记录。", "operationId": "delete_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "delete issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "由作者或管理员更新议题字段,并记录标题、正文和关联变化。", "operationId": "update_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateIssueCmd" } } }, "required": true }, "responses": { "200": { "description": "update issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/attachments": { "get": { "tags": [ "issues" ], "description": "列出议题的附件(只返回已上传完成的)。", "operationId": "list_issue_attachments", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list attachments", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_IssueAttachmentDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/close": { "post": { "tags": [ "issues" ], "description": "将议题标记为已关闭;重复关闭时保持幂等。", "operationId": "close_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "close issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments": { "get": { "tags": [ "issues" ], "description": "分页列出议题评论,可按父评论过滤并调整排序。", "operationId": "list_comments", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } }, { "name": "parent_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "sort", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CommentSort" } ] } }, { "name": "order", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] } } ], "responses": { "200": { "description": "list comments", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_CommentDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "在议题下新增评论或回复,并处理提及与通知。", "operationId": "create_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "create comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CommentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "creation quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/tree": { "get": { "tags": [ "issues" ], "description": "一次性返回议题评论的完整嵌套树。", "operationId": "list_comments_tree", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "nested comment tree", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_CommentTreeNode" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}": { "get": { "tags": [ "issues" ], "description": "读取指定议题下单条评论的详情。", "operationId": "get_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "get comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CommentDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "删除评论并将直接回复提升为顶级评论。", "operationId": "delete_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "编辑评论正文,并记录编辑历史与更新事件。", "operationId": "update_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "update comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CommentDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}/reactions": { "get": { "tags": [ "issues" ], "description": "按表情汇总评论上全部用户的回应。", "operationId": "list_comment_reactions", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list comment reactions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReactionAggDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/comments/{comment_id}/reactions/@me": { "put": { "tags": [ "issues" ], "description": "为评论添加当前用户的表情回应。", "operationId": "add_comment_reaction", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReactionCmd" } } }, "required": true }, "responses": { "200": { "description": "add my comment reaction", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReactionDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "按表情撤回当前用户在评论上的回应。", "operationId": "remove_comment_reaction", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "emoji", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "removed my comment reaction", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependencies": { "get": { "tags": [ "issues" ], "description": "列出当前议题依赖的其他议题。", "operationId": "list_dependencies", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list issue dependencies", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_DependencyDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "为议题创建指向同看板另一议题的依赖关系。", "operationId": "create_dependency", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDependencyCmd" } } }, "required": true }, "responses": { "200": { "description": "create issue dependency", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DependencyDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependencies/{dep_id}": { "delete": { "tags": [ "issues" ], "description": "按关系记录 ID 删除议题依赖。", "operationId": "delete_dependency", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dep_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete issue dependency", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/dependents": { "get": { "tags": [ "issues" ], "description": "列出依赖当前议题的其他议题。", "operationId": "list_dependents", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "issues depending on this one", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_DependencyDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/events": { "get": { "tags": [ "issues" ], "description": "按时间倒序读取议题的创建、编辑、状态和关联活动事件。", "operationId": "list_events", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list issue events", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_EventDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/history": { "get": { "tags": [ "issues" ], "description": "分页读取议题正文或评论的修改前后历史记录。", "operationId": "list_content_history", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list content history", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_ContentHistoryDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/labels": { "get": { "tags": [ "issues" ], "description": "列出议题当前绑定的标签。", "operationId": "list_labels_for_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list labels for issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LabelDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/labels/{label_id}": { "post": { "tags": [ "issues" ], "description": "将看板标签绑定到议题,并在重复绑定时返回冲突。", "operationId": "bind_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "bind label to issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "解除议题与指定标签的绑定。", "operationId": "unbind_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "unbind label from issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/members": { "get": { "tags": [ "issues" ], "description": "分页列出议题成员,可按指派、提及或参与角色过滤。", "operationId": "list_issue_members", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueMemberKind" } ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list issue members", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_IssueMemberDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "将空间成员添加为议题的指派人、提及者或参与者。", "operationId": "create_member", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateIssueMemberCmd" } } }, "required": true }, "responses": { "200": { "description": "create issue member", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueMemberDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/members/{member_id}": { "delete": { "tags": [ "issues" ], "description": "按成员记录 ID 移除议题的某个成员角色。", "operationId": "delete_member", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete issue member", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/pulls": { "get": { "tags": [ "pulls" ], "description": "列出与该工单关联的合并请求,私有仓库仅在调用者可见时返回。", "operationId": "list_issue_pulls", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "linked pull requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_IssuePullLinkDto" } } } } } }, "post": { "tags": [ "pulls" ], "description": "把一个合并请求关联到工单,需要对目标仓库有写权限。", "operationId": "link_issue_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LinkIssueCmd" } } }, "required": true }, "responses": { "200": { "description": "linked pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/pulls/{relation_id}": { "delete": { "tags": [ "pulls" ], "description": "解除工单与合并请求的关联。", "operationId": "unlink_issue_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "relation_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "relation removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/reactions": { "get": { "tags": [ "issues" ], "description": "按表情汇总议题上全部用户的回应。", "operationId": "list_issue_reactions", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list reactions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ReactionAggDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/reactions/@me": { "put": { "tags": [ "issues" ], "description": "为议题添加当前用户的表情回应。", "operationId": "add_issue_reaction", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReactionCmd" } } }, "required": true }, "responses": { "200": { "description": "add my reaction", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReactionDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "按表情撤回当前用户在议题上的回应。", "operationId": "remove_issue_reaction", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } }, { "name": "emoji", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "removed my reaction", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/read-state": { "put": { "tags": [ "issues" ], "description": "更新当前用户对议题的已读或未读状态。", "operationId": "mark_issue_read", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkIssueReadCmd" } } }, "required": true }, "responses": { "200": { "description": "mark issue read/unread for caller", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueUserDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/reopen": { "post": { "tags": [ "issues" ], "description": "重新打开已关闭议题;议题已开启时保持幂等。", "operationId": "reopen_issue", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "reopen issue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IssueDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/repos": { "get": { "tags": [ "issues" ], "description": "列出议题已关联的代码仓库关系。", "operationId": "list_repo_relations", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list issue repository relations", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_RepoRelDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "将代码仓库关联到议题,重复关联返回冲突。", "operationId": "create_repo_relation", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRepoRelCmd" } } }, "required": true }, "responses": { "200": { "description": "create issue repository relation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoRelDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/repos/{rel_id}": { "delete": { "tags": [ "issues" ], "description": "按关系记录 ID 删除议题与仓库的关联。", "operationId": "delete_repo_relation", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "rel_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete issue repository relation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/stopwatch": { "get": { "tags": [ "issues" ], "description": "查询当前用户在议题上的计时器运行状态。", "operationId": "get_stopwatch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get stopwatch status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_StopwatchDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/stopwatch/start": { "post": { "tags": [ "issues" ], "description": "为议题启动当前用户的计时器。", "operationId": "start_stopwatch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "start stopwatch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_StopwatchDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/stopwatch/stop": { "post": { "tags": [ "issues" ], "description": "停止议题计时器并将经过时长登记为工时。", "operationId": "stop_stopwatch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "stop stopwatch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/times": { "get": { "tags": [ "issues" ], "description": "分页读取议题工时记录,可按登记用户过滤。", "operationId": "list_tracked_time", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list tracked times", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_TrackedTimeDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "为议题手动登记当前用户的一段正整数工时。", "operationId": "create_tracked_time", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTrackedTimeCmd" } } }, "required": true }, "responses": { "200": { "description": "time logged", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TrackedTimeDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/times/{time_id}": { "delete": { "tags": [ "issues" ], "description": "删除当前用户自己登记的议题工时记录。", "operationId": "delete_tracked_time", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "time_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "time removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "修改当前用户自己登记的议题工时秒数。", "operationId": "update_tracked_time", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "time_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTrackedTimeCmd" } } }, "required": true }, "responses": { "200": { "description": "time updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TrackedTimeDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/users": { "get": { "tags": [ "issues" ], "description": "分页列出议题的已读用户及对应阅读状态。", "operationId": "list_issue_users", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "description": "issue uuid or board-scoped number (e.g. \"123\")", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list issue user states", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_IssueUserDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/issues/{issue_id}/watch": { "put": { "tags": [ "issues" ], "description": "设置当前用户对议题的关注、不关注或忽略模式。", "operationId": "upsert_issue_watch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "issue_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertWatchCmd" } } }, "required": true }, "responses": { "200": { "description": "upsert watch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_WatchDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/labels": { "get": { "tags": [ "issues" ], "description": "分页列出看板标签,可按名称与归档状态过滤。", "operationId": "list_labels", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "is_archived", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list labels", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_LabelDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "在看板内创建具有名称和颜色的议题标签。", "operationId": "create_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateLabelCmd" } } }, "required": true }, "responses": { "200": { "description": "create label", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LabelDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/labels/{label_id}": { "get": { "tags": [ "issues" ], "description": "读取看板内指定标签的定义与互斥设置。", "operationId": "get_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "get label", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LabelDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "删除看板标签并移除它与全部议题的绑定。", "operationId": "delete_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete label", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "更新标签名称、颜色、描述、互斥属性或归档状态。", "operationId": "update_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "label_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLabelCmd" } } }, "required": true }, "responses": { "200": { "description": "update label", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LabelDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/milestones": { "get": { "tags": [ "issues" ], "description": "分页列出看板里程碑及其议题完成统计。", "operationId": "list_milestones", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "is_closed", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list milestones", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MilestoneDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "在看板内创建里程碑及可选描述与截止时间。", "operationId": "create_milestone", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateMilestoneCmd" } } }, "required": true }, "responses": { "200": { "description": "create milestone", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MilestoneDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/milestones/{milestone_id}": { "get": { "tags": [ "issues" ], "description": "读取指定里程碑详情及当前议题完成情况。", "operationId": "get_milestone", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "milestone_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "get milestone", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MilestoneDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "issues" ], "description": "删除里程碑并解除议题关联,但不删除议题。", "operationId": "delete_milestone", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "milestone_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete milestone", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "更新里程碑名称、描述、截止时间或开启状态。", "operationId": "update_milestone", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "milestone_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMilestoneCmd" } } }, "required": true }, "responses": { "200": { "description": "update milestone", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MilestoneDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/pins": { "get": { "tags": [ "issues" ], "description": "按置顶顺序读取看板当前置顶的议题。", "operationId": "list_board_pins", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list pinned issues", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PinDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "issues" ], "description": "将议题置顶到看板并设置展示顺序。", "operationId": "create_pin", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePinCmd" } } }, "required": true }, "responses": { "200": { "description": "create pin", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PinDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/issues/{space_name}/boards/{board_id}/pins/{pin_id}": { "delete": { "tags": [ "issues" ], "description": "取消指定置顶记录但保留议题本身。", "operationId": "delete_pin", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "pin_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "delete pin", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "issues" ], "description": "调整看板置顶记录的排序位置。", "operationId": "update_pin", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "board_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "pin_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePinCmd" } } }, "required": true }, "responses": { "200": { "description": "pin updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PinDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/licenses": { "get": { "tags": [ "licenses" ], "description": "分页列出系统登记的许可证。", "operationId": "list_licenses", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list licenses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_LicenseDto" } } } } } } }, "/licenses/{name}": { "get": { "tags": [ "licenses" ], "description": "按名称读取许可证全文与登记信息。", "operationId": "get_license", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get license", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LicenseDto" } } } } } } }, "/me": { "get": { "tags": [ "account" ], "description": "返回当前登录用户的身份、账号状态与资料。", "operationId": "me", "responses": { "200": { "description": "identity and profile of the active user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MeResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "account" ], "description": "增量更新当前用户的显示资料、时区语言、可见性和资料开关。", "operationId": "update_profile", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileCmd" } } }, "required": true }, "responses": { "200": { "description": "profile fields updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/agreements/{key}": { "put": { "tags": [ "account" ], "description": "记录当前用户已同意指定版本的协议文本。", "operationId": "accept_agreement", "parameters": [ { "name": "key", "in": "path", "description": "agreement key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptAgreementCmd" } } }, "required": true }, "responses": { "200": { "description": "agreement acceptance recorded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AcceptAgreementResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/avatar": { "get": { "tags": [ "user" ], "description": "读取当前用户头像元数据;未设置时返回空数据。", "operationId": "get_avatar", "responses": { "200": { "description": "current avatar", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Option_AvatarDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "user" ], "description": "上传原始图片字节作为当前用户头像。", "operationId": "upload_avatar", "requestBody": { "description": "raw image bytes (image/jpeg, image/png, image/webp, image/gif)", "content": { "image/png": { "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } } }, "required": true }, "responses": { "200": { "description": "avatar uploaded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AvatarDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "user" ], "description": "清空当前用户头像并尽力删除存储对象。", "operationId": "delete_avatar", "responses": { "200": { "description": "avatar deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/deletion": { "get": { "tags": [ "account" ], "description": "读取当前账号的删除计划;没有计划时 data 为 null。", "operationId": "account_deletion_status", "responses": { "200": { "description": "deletion status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AccountDeletionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "account" ], "description": "申请删除当前账号:立即软删并撤销全部会话/令牌/SSH 公钥,宽限期后匿名化。仍有活跃组织 OWNER 身份时返回 409。", "operationId": "request_account_deletion", "responses": { "200": { "description": "deletion scheduled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_AccountDeletionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "account still owns an active organization", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "account" ], "description": "撤销尚未执行的账号删除计划;已撤销的会话与令牌不会恢复,需重新登录。", "operationId": "cancel_account_deletion", "responses": { "200": { "description": "deletion cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "no deletion is pending", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "account deletion is currently being purged", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/devices": { "get": { "tags": [ "account" ], "description": "按会话的用户代理归并出当前账号出现过的设备及其最近活跃时间。", "operationId": "list_devices", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "devices derived from active sessions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_DeviceDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_DeviceDto" } } } } } } }, "/me/memes": { "get": { "tags": [ "user" ], "description": "按创建时间返回当前用户的 meme 收藏。", "operationId": "list_memes", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list memes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_MemeDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "user" ], "description": "创建当前用户唯一的 meme 名称条目。", "operationId": "create_meme", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertMemeCmd" } } }, "required": true }, "responses": { "200": { "description": "meme created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemeDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/memes/{meme_id}": { "put": { "tags": [ "user" ], "description": "全量更新当前用户指定 meme 条目的元数据。", "operationId": "update_meme", "parameters": [ { "name": "meme_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertMemeCmd" } } }, "required": true }, "responses": { "200": { "description": "meme updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemeDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "user" ], "description": "物理删除当前用户的指定 meme 条目。", "operationId": "delete_meme", "parameters": [ { "name": "meme_id", "in": "path", "description": "meme id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "meme deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/messages/saved": { "get": { "tags": [ "user" ], "description": "分页列出当前用户收藏的消息引用。", "operationId": "list_saved_messages", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list saved messages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_SavedMessageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "user" ], "description": "收藏指定消息,已收藏时幂等返回。", "operationId": "save_message", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveMessageCmd" } } }, "required": true }, "responses": { "200": { "description": "save message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_SavedMessageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/messages/saved/{message_id}": { "delete": { "tags": [ "user" ], "description": "删除当前用户对指定消息的全部收藏记录。", "operationId": "unsave_message", "parameters": [ { "name": "message_id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "unsave message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/notifications": { "get": { "tags": [ "notifications" ], "description": "分页读取当前用户站内通知,可按类型或未读状态过滤。", "operationId": "list_notifications", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "type", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/NotificationType" } ] } }, { "name": "unread", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "notifications for the current user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_NotificationDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/notifications/read": { "put": { "tags": [ "account" ], "description": "按通知 ID 集合或 all=true 将当前用户的通知标记为已读。", "operationId": "mark_notifications_read", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarkNotificationsReadCmd" } } }, "required": true }, "responses": { "200": { "description": "notifications marked read", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MarkedCountResp" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/notifications/unread-count": { "get": { "tags": [ "notifications" ], "description": "统计当前用户尚未读取的通知数量。", "operationId": "unread_notifications_count", "responses": { "200": { "description": "number of unread notifications", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UnreadCountResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/notifications/{notification_id}": { "delete": { "tags": [ "notifications" ], "description": "删除当前用户名下的指定通知记录。", "operationId": "delete_notification", "parameters": [ { "name": "notification_id", "in": "path", "description": "notification id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "notification deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/preferences": { "get": { "tags": [ "account" ], "description": "读取当前用户的通知与界面偏好,未配置时返回默认值。", "operationId": "get_preferences", "responses": { "200": { "description": "preferences for the current user, defaults when unset", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserPreferencesDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "account" ], "description": "增量更新当前用户的通知、界面和静音等偏好设置。", "operationId": "update_preferences", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePreferencesCmd" } } }, "required": true }, "responses": { "200": { "description": "preferences updated, returning the canonical row", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserPreferencesDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/push-subscriptions": { "get": { "tags": [ "user" ], "description": "分页列出当前用户的浏览器推送订阅,不返回密钥。", "operationId": "list_push_subscriptions", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list push subscriptions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_PushSubscriptionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "user" ], "description": "按 endpoint 注册或更新浏览器推送订阅。", "operationId": "upsert_push_subscription", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertPushCmd" } } }, "required": true }, "responses": { "200": { "description": "upsert push subscription", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PushSubscriptionDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/push-subscriptions/{push_id}": { "delete": { "tags": [ "user" ], "description": "删除当前用户的指定推送订阅。", "operationId": "delete_push_subscription", "parameters": [ { "name": "push_id", "in": "path", "description": "push subscription id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "push subscription deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/recent-mentions": { "get": { "tags": [ "user" ], "description": "返回最近提及当前用户的消息引用。", "operationId": "recent_mentions", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "recent mentions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_RecentMentionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/reports": { "get": { "tags": [ "user" ], "description": "分页列出当前用户提交的举报及处理结果。", "operationId": "my_reports", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "my filed reports", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_UserReportDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "reports" ], "description": "提交针对其他用户的举报及可选证据,供平台按处理状态跟踪。", "operationId": "create_report", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateReportCmd" } } }, "required": true }, "responses": { "200": { "description": "report filed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReportDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/sessions": { "get": { "tags": [ "user" ], "description": "列出当前账号的登录会话,并标记当前会话。", "operationId": "list_sessions", "parameters": [ { "name": "kind", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SessionKind" } ] } }, { "name": "include_revoked", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "sessions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_SessionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "user" ], "description": "吊销当前账号除当前会话以外的全部会话。", "operationId": "revoke_all_sessions", "responses": { "200": { "description": "sessions revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CountResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/sessions/{session_id}": { "delete": { "tags": [ "user" ], "description": "吊销指定会话;会话不存在或不属于当前账号时返回 404。", "operationId": "revoke_session", "parameters": [ { "name": "session_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "session revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/spaces": { "get": { "tags": [ "user" ], "description": "列出当前用户激活成员身份的空间及有效权限。", "operationId": "my_spaces", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "my spaces", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MySpaceDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/suspensions": { "get": { "tags": [ "user" ], "description": "查看当前用户的处罚历史,可仅筛选仍生效记录。", "operationId": "my_suspensions", "parameters": [ { "name": "include_revoked", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "active", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "my suspensions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_SuspensionDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/me/username": { "put": { "tags": [ "account" ], "description": "校验格式和全局唯一性后修改当前用户用户名。", "operationId": "update_username", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUsernameCmd" } } }, "required": true }, "responses": { "200": { "description": "username updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserPublic" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/pulls/@me/{scope}": { "get": { "tags": [ "pulls" ], "description": "跨仓库的个人合并请求收件箱:我创建的、待我评审的、我评审过的。", "operationId": "list_my_pulls", "parameters": [ { "name": "scope", "in": "path", "description": "created | review-requested | reviewed", "required": true, "schema": { "type": "string" } }, { "name": "state", "in": "query", "description": "open | closed | merged | all", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "inbox", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_PullDto" } } } } } } }, "/push/config": { "get": { "tags": [ "push" ], "description": "读取 Web Push 是否启用及其 VAPID 公钥(注册推送订阅所需,无会话要求)。", "operationId": "push_config", "responses": { "200": { "description": "web push configuration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PushConfigDto" } } } } } } }, "/repos/utils/commit-signature": { "post": { "tags": [ "content" ], "description": "返回当前用户用于创建 Git 提交的姓名、邮箱和服务器时间。", "operationId": "caller_signature", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CallerSignatureBody" } } }, "required": true }, "responses": { "200": { "description": "caller git signature", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_SignatureDto" } } } } } } }, "/repos/utils/patch/parse": { "post": { "tags": [ "patches" ], "description": "解析补丁文本并统计涉及文件与增删行数。", "operationId": "patch_parse", "requestBody": { "content": { "text/plain": { "schema": { "type": "string" } } }, "required": true }, "responses": { "200": { "description": "parse patch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ParsedPatchDto" } } } } } } }, "/repos/{space_name}": { "get": { "tags": [ "repos" ], "description": "分页列出空间中当前调用者可见的仓库,并支持名称、时间或星数排序。", "operationId": "list_repos", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "sort", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RepoSort" } ] } }, { "name": "order", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] } } ], "responses": { "200": { "description": "list repos", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_RepoSummaryDto" } } } } } }, "post": { "tags": [ "repos" ], "description": "在指定空间下创建仓库记录并初始化裸库和初始提交;仅空间所有者可操作。", "operationId": "create_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRepoCmd" } } }, "required": true }, "responses": { "200": { "description": "create repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoDto" } } } } } } }, "/repos/{space_name}/{repo_name}": { "get": { "tags": [ "repos" ], "description": "读取仓库详情,并在已登录时附带当前用户的加星和关注状态。", "operationId": "get_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoDto" } } } } } }, "patch": { "tags": [ "repos" ], "description": "更新仓库描述、主页、可见性、LFS 和默认分支;仅空间所有者可操作。", "operationId": "update_repo", "parameters": [ { "name": "space_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/UpdateRepoCmd" } } }, "required": true }, "responses": { "200": { "description": "update repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoDto" } } } } } } }, "/repos/{space_name}/{repo_name}/analysis/code-activity": { "get": { "tags": [ "analysis" ], "description": "按作者汇总指定分支的提交、新增和删除活动。", "operationId": "code_activity", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "branch", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "code activity analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CodeActivityDto" } } } } } } }, "/repos/{space_name}/{repo_name}/analysis/contributors": { "get": { "tags": [ "analysis" ], "description": "按提交数返回指定修订历史的贡献者及代码量统计。", "operationId": "contributors", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "contributor statistics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ContributorStatDto" } } } } } } }, "/repos/{space_name}/{repo_name}/analysis/languages": { "get": { "tags": [ "analysis" ], "description": "读取最近一次已计算的仓库语言统计。", "operationId": "languages_read", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "cached language analysis", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LanguageStatDto" } } } } } }, "post": { "tags": [ "analysis" ], "description": "重新扫描仓库树并持久化语言构成与主语言统计。", "operationId": "languages", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "analyze languages", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LanguageStatDto" } } } } } } }, "/repos/{space_name}/{repo_name}/archive": { "post": { "tags": [ "repos" ], "description": "将仓库标记为归档状态,禁止继续作为常规写入目标。", "operationId": "archive_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "archive repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoDto" } } } } } } }, "/repos/{space_name}/{repo_name}/archives": { "post": { "tags": [ "archives" ], "description": "为指定修订生成归档并上传存储,返回下载地址。", "operationId": "create_archive", "parameters": [ { "name": "space_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/ArchiveCreateCmd" } } }, "required": true }, "responses": { "200": { "description": "build archive and return download link", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ArchiveResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/archives/bundle": { "post": { "tags": [ "archives" ], "description": "将仓库全部引用打包为 Git bundle 并上传存储。", "operationId": "create_bundle", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "create git bundle", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ArchiveResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/archives/{revision}": { "get": { "tags": [ "archives" ], "description": "查询已生成归档的元数据并换取短期下载地址。", "operationId": "get_archive", "parameters": [ { "name": "space_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" } }, { "name": "format", "in": "query", "description": "archive format", "required": true, "schema": { "type": "string" } }, { "name": "path_filter", "in": "query", "description": "path filter", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "download archive", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ArchiveResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/blame": { "get": { "tags": [ "blame" ], "description": "返回文件逐行 blame 区间,可限定连续行范围。", "operationId": "blame", "parameters": [ { "name": "space_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": "range_start", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 } }, { "name": "range_end", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 } } ], "responses": { "200": { "description": "blame ranges", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_BlameRangeDto" } } } } } } }, "/repos/{space_name}/{repo_name}/blobs/{oid}/content": { "get": { "tags": [ "blobs" ], "description": "读取 Blob 原始内容,超过配置上限时截断并标记。", "operationId": "blob_content", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "oid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "blob content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BlobContentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/blobs/{oid}/metadata": { "get": { "tags": [ "blobs" ], "description": "返回 Blob 对象大小、二进制判断及 LFS 指针信息。", "operationId": "blob_metadata", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "oid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "blob metadata", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BlobMetaDto" } } } } } } }, "/repos/{space_name}/{repo_name}/branch-protection": { "get": { "tags": [ "protection" ], "description": "列出分支保护政策(含合并与必需审批规则),仅仓库管理员可读。", "operationId": "list_policies", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "branch protection policies", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_BranchPolicyDto" } } } } } }, "post": { "tags": [ "protection" ], "description": "为分支模式创建保护政策,包含必需审批数、合并白名单与受保护文件模式。", "operationId": "create_policy", "parameters": [ { "name": "space_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/CreateBranchPolicyCmd" } } }, "required": true }, "responses": { "200": { "description": "created policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchPolicyDto" } } } } } } }, "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}": { "get": { "tags": [ "protection" ], "description": "读取单条分支保护政策。", "operationId": "get_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "branch protection policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchPolicyDto" } } } } } }, "delete": { "tags": [ "protection" ], "description": "删除分支保护政策;该政策下的白名单需要先行清理。", "operationId": "delete_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "policy deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "protection" ], "description": "修改分支保护政策的各项开关。", "operationId": "update_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBranchPolicyCmd" } } }, "required": true }, "responses": { "200": { "description": "updated policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchPolicyDto" } } } } } } }, "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}/whitelists": { "get": { "tags": [ "branch_protection" ], "description": "列出分支保护策略关联的用户与群组白名单。", "operationId": "list_branch_whitelists", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list branch whitelists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_BranchWhitelistDto" } } } } } }, "post": { "tags": [ "branch_protection" ], "description": "为分支保护策略添加用户或群组白名单。", "operationId": "add_branch_whitelist", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddBranchWhitelistCmd" } } }, "required": true }, "responses": { "200": { "description": "add branch whitelist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchWhitelistDto" } } } } } } }, "/repos/{space_name}/{repo_name}/branch-protection/{policy_id}/whitelists/{whitelist_id}": { "delete": { "tags": [ "branch_protection" ], "description": "删除指定分支保护策略下的白名单条目。", "operationId": "remove_branch_whitelist", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "whitelist_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "remove branch whitelist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/branches": { "get": { "tags": [ "branches" ], "description": "列出 Git 分支并同步保护状态与数据库镜像后分页返回。", "operationId": "list_branches", "parameters": [ { "name": "space_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", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list branches", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_BranchDto" } } } } } }, "post": { "tags": [ "branches" ], "description": "从指定起点创建新分支引用并更新分支元数据。", "operationId": "create_branch", "parameters": [ { "name": "space_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/CreateBranchCmd" } } }, "required": true }, "responses": { "200": { "description": "create branch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchDto" } } } } } } }, "/repos/{space_name}/{repo_name}/branches/{name}": { "get": { "tags": [ "branches" ], "description": "读取单个分支的当前提交、保护状态和元数据。", "operationId": "get_branch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get branch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_BranchDto" } } } } } }, "delete": { "tags": [ "branches" ], "description": "删除分支引用并标记数据库记录;受保护分支会被拒绝。", "operationId": "delete_branch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "force", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "delete branch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "branches" ], "description": "重命名分支引用并同步更新分支元数据记录。", "operationId": "rename_branch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RenameBranchCmd" } } }, "required": true }, "responses": { "200": { "description": "rename branch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/branches/{name}/default": { "put": { "tags": [ "branches" ], "description": "将指定分支设置为仓库默认分支,并同步 Git 与数据库。", "operationId": "set_default_branch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "set default branch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/code-comments": { "get": { "tags": [ "code-comments" ], "description": "列出代码行级评论;可按 path 与 revision 过滤,锚定提交非当前分支提示时标记 outdated。", "operationId": "list_code_comments", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "revision", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "resolved", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "code comment page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_CodeCommentDto" } } } } } }, "post": { "tags": [ "code-comments" ], "description": "在代码浏览/提交差异的某一行发表行级评论;锚定到解析出的提交快照。", "operationId": "create_code_comment", "parameters": [ { "name": "space_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/CreateCodeCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "created code comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CodeCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/code-comments/{comment_id}": { "delete": { "tags": [ "code-comments" ], "description": "删除行级评论及其回复;仅作者或仓库管理员可操作。", "operationId": "delete_code_comment", "parameters": [ { "name": "space_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" } } ], "responses": { "200": { "description": "code comment deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "code-comments" ], "description": "修改行级评论正文;仅作者或仓库管理员可操作。", "operationId": "update_code_comment", "parameters": [ { "name": "space_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": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCodeCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "updated code comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CodeCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/code-comments/{comment_id}/resolve": { "put": { "tags": [ "code-comments" ], "description": "把行级评论标记为已解决。", "operationId": "resolve_code_comment", "parameters": [ { "name": "space_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" } } ], "responses": { "200": { "description": "resolved code comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CodeCommentDto" } } } } } }, "delete": { "tags": [ "code-comments" ], "description": "取消已解决标记。", "operationId": "unresolve_code_comment", "parameters": [ { "name": "space_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" } } ], "responses": { "200": { "description": "unresolved code comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CodeCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/commit-statuses": { "post": { "tags": [ "commits" ], "description": "为提交的指定 context 创建或更新 CI 状态。", "operationId": "set_commit_status", "parameters": [ { "name": "space_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/SetCommitStatusCmd" } } }, "required": true }, "responses": { "200": { "description": "set commit status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CommitStatusDto" } } } } } } }, "/repos/{space_name}/{repo_name}/commit-statuses/{sha}": { "get": { "tags": [ "commits" ], "description": "按提交 SHA 读取全部状态检查记录及创建者。", "operationId": "list_commit_statuses", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list commit statuses", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_CommitStatusDto" } } } } } } }, "/repos/{space_name}/{repo_name}/commits": { "get": { "tags": [ "commits" ], "description": "按修订、路径、时间窗和首父条件分页查询提交历史。", "operationId": "list_commits", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "revision", "in": "query", "description": "start revision", "required": false, "schema": { "type": "string" } }, { "name": "path", "in": "query", "description": "path filter", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "max commits per page (1-100)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "skip commits before returning (max 5000)", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "since", "in": "query", "description": "since date", "required": false, "schema": { "type": "string" } }, { "name": "until", "in": "query", "description": "until date", "required": false, "schema": { "type": "string" } }, { "name": "first_parent", "in": "query", "description": "first parent only", "required": true, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "list commits", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_CommitDto" } } } } } } }, "/repos/{space_name}/{repo_name}/commits/ancestor": { "get": { "tags": [ "commits" ], "description": "判断一个修订是否位于另一个修订的提交历史中。", "operationId": "is_ancestor", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ancestor", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "descendant", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "check commit ancestry", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_IsAncestorResponse" } } } } } } }, "/repos/{space_name}/{repo_name}/commits/stats": { "get": { "tags": [ "commits" ], "description": "统计指定提交的文件变更与增删行数,可限定到单个路径。", "operationId": "commit_stats", "parameters": [ { "name": "space_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" ] } } ], "responses": { "200": { "description": "commit stats" } } } }, "/repos/{space_name}/{repo_name}/commits/{revision}": { "get": { "tags": [ "commits" ], "description": "读取任意修订表达式对应的单个提交详情。", "operationId": "get_commit", "parameters": [ { "name": "space_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": "get commit" } } } }, "/repos/{space_name}/{repo_name}/conflicts": { "get": { "tags": [ "conflicts" ], "description": "检测两个修订合并时是否冲突,并返回可快进标记。", "operationId": "get_conflicts", "parameters": [ { "name": "space_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": "ancestor", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "merge conflict status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MergeStatusDto" } } } } } } }, "/repos/{space_name}/{repo_name}/conflicts/detail": { "get": { "tags": [ "conflicts" ], "description": "读取指定冲突文件在合并检查中生成的冲突内容。", "operationId": "conflict_detail", "parameters": [ { "name": "space_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": "path", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "conflict detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ConflictDetailDto" } } } } } } }, "/repos/{space_name}/{repo_name}/diff": { "get": { "tags": [ "diffs" ], "description": "按 numstat、shortstat、files 或 tree 视图返回两个修订间的差异。", "operationId": "get_diff", "parameters": [ { "name": "space_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": "view", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/DiffView" } }, { "name": "use_merge_base", "in": "query", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "diff payload shaped by view (shortstat | numstat | files | tree)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Value" } } } } } } }, "/repos/{space_name}/{repo_name}/diff/for-commit/{commit}": { "get": { "tags": [ "diffs" ], "description": "按完整提交对象 ID 返回该提交相对父提交的变更路径列表。", "operationId": "diff_for_commit", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commit", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "changed paths for commit" } } } }, "/repos/{space_name}/{repo_name}/diff/range": { "get": { "tags": [ "diffs" ], "description": "返回提交区间差异,并可用公共基线执行三点式比较。", "operationId": "range_diff", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "from", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "to", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "base", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "range diff", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_String" } } } } } } }, "/repos/{space_name}/{repo_name}/diff/raw": { "get": { "tags": [ "diffs" ], "description": "返回两个修订之间的原始 unified diff 文本。", "operationId": "diff_raw", "parameters": [ { "name": "space_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": "raw diff", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_String" } } } } } } }, "/repos/{space_name}/{repo_name}/hooks/{script}": { "post": { "tags": [ "hooks" ], "description": "以受控参数执行仓库 pre-receive 或 post-receive 脚本并回传结果。", "operationId": "execute_script", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "script", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/HookEventKind" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HookExecBody" } } }, "required": true }, "responses": { "200": { "description": "execute hook script", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ScriptOutputDto" } } } } } } }, "/repos/{space_name}/{repo_name}/lfs-pointers": { "get": { "tags": [ "blobs" ], "description": "列出指定修订历史中可达的 LFS 指针对象。", "operationId": "list_lfs_pointers", "parameters": [ { "name": "space_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": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 } } ], "responses": { "200": { "description": "list lfs pointers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LfsPointerDto" } } } } } } }, "/repos/{space_name}/{repo_name}/lfs/locks": { "get": { "tags": [ "lfs" ], "description": "按创建时间游标分页读取仓库 LFS 文件锁。", "operationId": "list_locks", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list lfs locks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LfsLockListResponse" } } } } } }, "post": { "tags": [ "lfs" ], "description": "为启用 LFS 的仓库路径创建文件锁。", "operationId": "lock", "parameters": [ { "name": "space_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/LfsLockBody" } } }, "required": true }, "responses": { "200": { "description": "lock lfs path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LfsLock" } } } } } }, "delete": { "tags": [ "lfs" ], "description": "按路径释放 LFS 文件锁;管理员可用 force 越权释放。", "operationId": "unlock", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "force", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "remove lfs lock by path", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/lfs/locks/verify": { "post": { "tags": [ "lfs" ], "description": "返回当前用户的 LFS 锁并区分他人持有的锁。", "operationId": "verify_locks", "parameters": [ { "name": "space_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", "minimum": 0 } } ], "responses": { "200": { "description": "verify lfs locks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_LfsVerifyLocksResponse" } } } } } } }, "/repos/{space_name}/{repo_name}/lfs/locks/{lock_id}": { "delete": { "tags": [ "lfs" ], "description": "按锁 ID 释放 LFS 文件锁,规则与按路径解锁一致。", "operationId": "unlock_by_id", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "lock_id", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "force", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "remove lfs lock by id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/patch/generate": { "get": { "tags": [ "patches" ], "description": "基于两个修订生成可保存的补丁内容。", "operationId": "patch_generate", "parameters": [ { "name": "space_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": "generate patch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PatchDto" } } } } } } }, "/repos/{space_name}/{repo_name}/path-log": { "get": { "tags": [ "logs" ], "description": "返回目录中每个条目的最近一次提交摘要。", "operationId": "path_log", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "commit_hash", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "target_dir", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "path log entries", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PathLogEntryDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls": { "get": { "tags": [ "pulls" ], "description": "按状态、作者、分支、草稿标记或关键字分页查询合并请求。", "operationId": "list_pulls", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "state", "in": "query", "description": "open | closed | merged | all", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "author", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "base", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "head", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "draft", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "search", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "sort", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PullSort" } ] } }, { "name": "order", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list pull requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_PullDto" } } } } } }, "post": { "tags": [ "pulls" ], "description": "在同一仓库的 head 与 base 分支之间创建合并请求。", "operationId": "create_pull", "parameters": [ { "name": "space_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/CreatePullCmd" } } }, "required": true }, "responses": { "200": { "description": "created pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/label-options": { "get": { "tags": [ "pulls" ], "description": "列出该仓库目录下可用于合并请求的标签(排除已归档)。", "operationId": "list_label_options", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "label options", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LabelDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}": { "get": { "tags": [ "pulls" ], "description": "读取单个合并请求,附带实时可合并状态与领先/落后提交数。", "operationId": "get_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "pull request detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } }, "delete": { "tags": [ "pulls" ], "description": "删除合并请求及其评审、评论、标签、指派人、事件与工单关联,仅仓库管理员可用。", "operationId": "delete_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "pull request deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "pulls" ], "description": "修改标题、正文、base 分支、草稿标记、自动合并或关联工单。", "operationId": "update_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePullCmd" } } }, "required": true }, "responses": { "200": { "description": "updated pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/assignees": { "get": { "tags": [ "pulls" ], "description": "列出合并请求的指派人。", "operationId": "list_pull_assignees", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "assignees", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullAssigneeDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/assignees/{user_ref}": { "post": { "tags": [ "pulls" ], "description": "把用户加入合并请求的指派人。", "operationId": "add_pull_assignee", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_ref", "in": "path", "description": "用户名或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "assignees", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullAssigneeDto" } } } } } }, "delete": { "tags": [ "pulls" ], "description": "移除合并请求的指派人。", "operationId": "remove_pull_assignee", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_ref", "in": "path", "description": "用户名或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "assignees", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullAssigneeDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/checks": { "get": { "tags": [ "pulls" ], "description": "返回 head 提交上的状态检查与流水线运行记录。", "operationId": "get_pull_checks", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "checks", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullChecksDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/close": { "post": { "tags": [ "pulls" ], "description": "关闭合并请求(不删除分支)。", "operationId": "close_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "close pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/comments": { "get": { "tags": [ "pulls" ], "description": "分页读取合并请求的全部评论(含行内评论)。", "operationId": "list_pull_comments", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "comments", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_PullCommentDto" } } } } } }, "post": { "tags": [ "pulls" ], "description": "新增合并请求评论;带 path 时为行内评审评论。", "operationId": "create_pull_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePullCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "created comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/comments/tree": { "get": { "tags": [ "pulls" ], "description": "以顶层评论嵌套回复的线程树返回评论。", "operationId": "list_pull_comment_tree", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "comment threads", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullCommentThreadDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/comments/{comment_id}": { "delete": { "tags": [ "pulls" ], "description": "删除自己的评论及其直接回复(管理员可删任意评论)。", "operationId": "delete_pull_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "comment deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "pulls" ], "description": "修改自己发表的评论(管理员可改任意评论)。", "operationId": "update_pull_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePullCommentCmd" } } }, "required": true }, "responses": { "200": { "description": "updated comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/comments/{comment_id}/resolve": { "put": { "tags": [ "pulls" ], "description": "标记行内评审评论为已解决。", "operationId": "resolve_pull_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "resolved comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullCommentDto" } } } } } }, "delete": { "tags": [ "pulls" ], "description": "重新打开已解决的行内评审评论。", "operationId": "unresolve_pull_comment", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "comment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "unresolved comment", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullCommentDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/commits": { "get": { "tags": [ "pulls" ], "description": "列出合并请求 base..head 之间的提交(正序,最多 200 条)。", "operationId": "list_pull_commits", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "pull request commits", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_MergeCommitDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/events": { "get": { "tags": [ "pulls" ], "description": "分页读取合并请求时间线(创建、评审、合并、推送更新等)。", "operationId": "list_pull_events", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "pull request timeline", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_PullEventDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/files": { "get": { "tags": [ "pulls" ], "description": "按 merge-base 到 head 的三点差异返回变更文件与逐文件补丁。", "operationId": "get_pull_files", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "changed files", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_ChangedPathDiffDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/gate": { "get": { "tags": [ "pulls" ], "description": "合并门禁预览:冲突状态、审批进度、落后提交与阻塞原因。", "operationId": "get_pull_gate", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "merge gate", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullGateDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/labels": { "get": { "tags": [ "pulls" ], "description": "列出合并请求已绑定的标签。", "operationId": "list_pull_labels", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "labels", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LabelDto" } } } } } }, "post": { "tags": [ "pulls" ], "description": "为合并请求绑定标签,标签取自仓库所在目录的标签库。", "operationId": "attach_pull_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AttachLabelCmd" } } }, "required": true }, "responses": { "200": { "description": "labels", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LabelDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/labels/{label_ref}": { "delete": { "tags": [ "pulls" ], "description": "解绑合并请求上的一个标签。", "operationId": "detach_pull_label", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "label_ref", "in": "path", "description": "标签 UUID 或名称。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "labels", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_LabelDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/lock": { "put": { "tags": [ "pulls" ], "description": "锁定合并请求,锁定后仅作者与管理员可再改动。", "operationId": "lock_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "locked pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } }, "delete": { "tags": [ "pulls" ], "description": "解除合并请求锁定。", "operationId": "unlock_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "unlocked pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/merge": { "post": { "tags": [ "pulls" ], "description": "按合并策略与分支保护规则合并请求;被门禁拦截时返回 409 与原因。", "operationId": "merge_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MergePullCmd" } } }, "required": true }, "responses": { "200": { "description": "merge result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MergePullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/patch": { "get": { "tags": [ "pulls" ], "description": "返回合并请求的原始 unified diff(text/plain)。", "operationId": "get_pull_patch", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "raw patch", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/reopen": { "post": { "tags": [ "pulls" ], "description": "重新打开已关闭的合并请求。", "operationId": "reopen_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "reopen pull request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/requested-reviewers": { "get": { "tags": [ "reviews" ], "description": "列出合并请求的审阅请求与各自状态。", "operationId": "list_requested_reviewers", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "reviewers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullReviewerDto" } } } } } }, "post": { "tags": [ "reviews" ], "description": "请求指定用户评审;required=true 时计入分支保护的必需审批人数。", "operationId": "request_reviewers", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestReviewersCmd" } } }, "required": true }, "responses": { "200": { "description": "reviewers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullReviewerDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/requested-reviewers/{user_id}": { "delete": { "tags": [ "reviews" ], "description": "取消某个用户的审阅请求。", "operationId": "delete_requested_reviewer", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "reviewers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullReviewerDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/reviews": { "get": { "tags": [ "reviews" ], "description": "列出合并请求的评审记录(他人的草稿评审不可见)。", "operationId": "list_reviews", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "reviews", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_PullReviewDto" } } } } } }, "post": { "tags": [ "reviews" ], "description": "提交评审:approve / request_changes / comment,或以 pending 存为草稿并附带行内评论。", "operationId": "submit_review", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitReviewCmd" } } }, "required": true }, "responses": { "200": { "description": "submitted review", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullReviewDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/reviews/{review_id}": { "get": { "tags": [ "reviews" ], "description": "读取单条评审记录。", "operationId": "get_review", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "review_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "review", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullReviewDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/reviews/{review_id}/dismiss": { "put": { "tags": [ "reviews" ], "description": "撤销一条评审结论,仅仓库管理员可用。", "operationId": "dismiss_review", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "review_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "dismissed review", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullReviewDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/reviews/{review_id}/submit": { "post": { "tags": [ "reviews" ], "description": "发布自己的待提交评审草稿,草稿行内评论同时公开并计入审批门禁。", "operationId": "publish_review", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "review_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitReviewCmd" } } }, "required": true }, "responses": { "200": { "description": "published review", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullReviewDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/summary": { "post": { "tags": [ "pulls" ], "description": "重新对齐 head/base 快照并重算增删行数、文件数与冲突状态。", "operationId": "refresh_pull_summary", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "recomputed summary", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PullSummaryDto" } } } } } } }, "/repos/{space_name}/{repo_name}/pulls/{pull_ref}/update-branch": { "post": { "tags": [ "pulls" ], "description": "把 base 分支最新提交并入 head 分支,用于解除落后阻塞。", "operationId": "update_branch_pull", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "pull_ref", "in": "path", "description": "PR 编号(`12`)或 UUID。", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "branch updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UpdateBranchDto" } } } } } } }, "/repos/{space_name}/{repo_name}/releases": { "get": { "tags": [ "releases" ], "description": "列出仓库发布记录(新→旧),可按草稿状态过滤。", "operationId": "list_releases", "parameters": [ { "name": "space_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", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "draft", "in": "query", "description": "仅返回草稿(true)或仅返回已发布(false);缺省返回全部。", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "release page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_ReleaseDto" } } } } } }, "post": { "tags": [ "releases" ], "description": "创建发布记录;草稿不会对访客展示,发布后正文不可再修改。", "operationId": "create_release", "parameters": [ { "name": "space_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/CreateReleaseCmd" } } }, "required": true }, "responses": { "200": { "description": "created release", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReleaseDto" } } } } } } }, "/repos/{space_name}/{repo_name}/releases/{tag}": { "get": { "tags": [ "releases" ], "description": "按标签读取单条发布记录。", "operationId": "get_release", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tag", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "release", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReleaseDto" } } } } } }, "delete": { "tags": [ "releases" ], "description": "删除发布记录(不删除 git 标签本身)。", "operationId": "delete_release", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tag", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "release deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "releases" ], "description": "更新发布记录;把 is_draft 置为 false 即发布,发布后标题与正文不可再改。", "operationId": "update_release", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "tag", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateReleaseCmd" } } }, "required": true }, "responses": { "200": { "description": "updated release", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ReleaseDto" } } } } } } }, "/repos/{space_name}/{repo_name}/remotes": { "get": { "tags": [ "remotes" ], "description": "列出仓库远程及其 fetch 与 push 地址。", "operationId": "list_remotes", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "configured remotes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_RemoteDto" } } } } } } }, "/repos/{space_name}/{repo_name}/remotes/fetch": { "post": { "tags": [ "remotes" ], "description": "从指定远程抓取引用并修剪已删除的远端分支。", "operationId": "fetch_remote", "parameters": [ { "name": "space_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/RemoteFetchBody" } } }, "required": true }, "responses": { "200": { "description": "fetch from remote", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_FetchResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/remotes/import": { "post": { "tags": [ "remotes" ], "description": "以镜像抓取方式将外部仓库的全部引用导入现有仓库。", "operationId": "clone_import", "parameters": [ { "name": "space_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/RemoteImportBody" } } }, "required": true }, "responses": { "200": { "description": "clone and import remote repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ImportResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/remotes/push": { "post": { "tags": [ "remotes" ], "description": "推送指定 refspec 到远程,并返回成功与被拒绝的引用。", "operationId": "push", "parameters": [ { "name": "space_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/RemotePushBody" } } }, "required": true }, "responses": { "200": { "description": "push to remote", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PushResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/remotes/{name}": { "put": { "tags": [ "remotes" ], "description": "新增或幂等更新远程地址,并校验 URL 协议与内网访问限制。", "operationId": "upsert_remote", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoteAddBody" } } }, "required": true }, "responses": { "200": { "description": "remote created or url updated (idempotent)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "remotes" ], "description": "删除仓库配置的指定远程。", "operationId": "remove", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "remove remote", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/rev/{revision}": { "get": { "tags": [ "commits" ], "description": "将分支、标签、短 SHA 或相对修订表达式解析为对象 ID。", "operationId": "rev_parse", "parameters": [ { "name": "space_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": "parse revision", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_String" } } } } } } }, "/repos/{space_name}/{repo_name}/signatures/commit/{sha}": { "get": { "tags": [ "signatures" ], "description": "验证提交 GPG 签名并返回签名者、密钥和验证结果。", "operationId": "verify_commit", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sha", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "verify commit signature", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VerifyResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/signatures/tag/{name}": { "get": { "tags": [ "signatures" ], "description": "验证附注标签的 GPG 签名并返回签名结果。", "operationId": "verify_tag", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "verify tag signature", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_VerifyResultDto" } } } } } } }, "/repos/{space_name}/{repo_name}/star": { "put": { "tags": [ "repos" ], "description": "为仓库加星并返回加星后的总星数。", "operationId": "star_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "star repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoStarResp" } } } } } }, "delete": { "tags": [ "repos" ], "description": "取消当前用户对仓库的加星并返回最新星数。", "operationId": "unstar_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "unstar repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoStarResp" } } } } } } }, "/repos/{space_name}/{repo_name}/stargazers": { "get": { "tags": [ "repos" ], "description": "分页列出最近为仓库加星的用户。", "operationId": "list_stargazers", "parameters": [ { "name": "space_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", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list stargazers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_StargazerDto" } } } } } } }, "/repos/{space_name}/{repo_name}/submodules": { "get": { "tags": [ "submodules" ], "description": "读取指定修订根树中的子模块条目,并合并 URL、分支和记录的提交。", "operationId": "submodule_list", "parameters": [ { "name": "space_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" } } ], "responses": { "200": { "description": "list submodules", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_SubmoduleDto" } } } } } } }, "/repos/{space_name}/{repo_name}/submodules/resolve": { "get": { "tags": [ "submodules" ], "description": "解析指定修订下子模块路径记录的 Gitlink 提交 ID。", "operationId": "submodule_resolve", "parameters": [ { "name": "space_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": "resolve submodule oid", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_String" } } } } } } }, "/repos/{space_name}/{repo_name}/tag-protection": { "get": { "tags": [ "tag_protection" ], "description": "列出标签保护策略。", "operationId": "list_tag_policies", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "tag protection policies", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_TagPolicyDto" } } } } } }, "post": { "tags": [ "tag_protection" ], "description": "为标签名模式创建保护策略;模式命中且创建者不在白名单内的 tag 推送将被拒绝。", "operationId": "create_tag_policy", "parameters": [ { "name": "space_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/CreateTagPolicyCmd" } } }, "required": true }, "responses": { "200": { "description": "created tag policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagPolicyDto" } } } } } } }, "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}": { "get": { "tags": [ "tag_protection" ], "description": "读取单条标签保护策略。", "operationId": "get_tag_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "tag protection policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagPolicyDto" } } } } } }, "delete": { "tags": [ "tag_protection" ], "description": "删除标签保护策略,并清理该策略下的用户白名单。", "operationId": "delete_tag_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "tag policy deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "tag_protection" ], "description": "更新标签保护策略的模式。", "operationId": "update_tag_policy", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTagPolicyCmd" } } }, "required": true }, "responses": { "200": { "description": "updated tag policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagPolicyDto" } } } } } } }, "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}/whitelists": { "get": { "tags": [ "tag_protection" ], "description": "列出标签保护策略关联的用户白名单。", "operationId": "list_tag_whitelists", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list tag whitelists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_TagWhitelistDto" } } } } } }, "post": { "tags": [ "tag_protection" ], "description": "为标签保护策略添加用户白名单。", "operationId": "add_tag_whitelist", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddTagWhitelistCmd" } } }, "required": true }, "responses": { "200": { "description": "add tag whitelist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagWhitelistDto" } } } } } } }, "/repos/{space_name}/{repo_name}/tag-protection/{policy_id}/whitelists/{user_id}": { "delete": { "tags": [ "tag_protection" ], "description": "移除标签保护策略中的指定用户白名单。", "operationId": "remove_tag_whitelist", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "policy_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "remove tag whitelist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/tags": { "get": { "tags": [ "tags" ], "description": "分页列出仓库标签及其类型、目标提交和打标签信息。", "operationId": "list_tags", "parameters": [ { "name": "space_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", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list tags", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_TagDto" } } } } } }, "post": { "tags": [ "tags" ], "description": "在指定目标上创建附注或轻量标签,并登记标签元数据。", "operationId": "create_tag", "parameters": [ { "name": "space_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/CreateTagCmd" } } }, "required": true }, "responses": { "200": { "description": "create tag", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagDto" } } } } } } }, "/repos/{space_name}/{repo_name}/tags/{name}": { "get": { "tags": [ "tags" ], "description": "读取单个标签详情及其指向的标签或提交对象。", "operationId": "get_tag", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get tag", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TagDto" } } } } } }, "delete": { "tags": [ "tags" ], "description": "删除标签引用和数据库记录;受保护标签会被拒绝。", "operationId": "delete_tag", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "delete tag", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/topics": { "get": { "tags": [ "repos" ], "description": "列出仓库当前绑定的标签。", "operationId": "list_repo_topics", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list repo topics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_TopicDto" } } } } } } }, "/repos/{space_name}/{repo_name}/topics/{topic_name}": { "put": { "tags": [ "repos" ], "description": "为仓库绑定标签,并在标签不存在时自动创建。", "operationId": "add_topic_to_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "topic_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "add topic to repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TopicDto" } } } } } }, "delete": { "tags": [ "repos" ], "description": "解除仓库与指定标签的关联,但保留标签本身。", "operationId": "remove_topic_from_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "topic_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "remove topic from repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/repos/{space_name}/{repo_name}/tree/{revision}": { "get": { "tags": [ "trees" ], "description": "读取修订下的目录树,并支持递归、符号链接解析和更新时间视图。", "operationId": "get_tree", "parameters": [ { "name": "space_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" } }, { "name": "path", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "recurse", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "resolve", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "show_trees", "in": "query", "required": false, "schema": { "type": "boolean" } }, { "name": "view", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/TreeView" } ] } } ], "responses": { "200": { "description": "tree payload: entries list, single entry (resolve), or last-updated list (view=last_updated)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Value" } } } } } } }, "/repos/{space_name}/{repo_name}/unarchive": { "post": { "tags": [ "repos" ], "description": "清除仓库的归档状态,使仓库恢复为可常规使用。", "operationId": "unarchive_repo", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "repo_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "unarchive repo", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoDto" } } } } } } }, "/repos/{space_name}/{repo_name}/watch": { "put": { "tags": [ "repos" ], "description": "设置或更新当前用户对仓库的关注、不关注或忽略模式。", "operationId": "upsert_watch", "parameters": [ { "name": "space_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/UpsertWatchCmd" } } }, "required": true }, "responses": { "200": { "description": "upsert watch", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepoWatchDto" } } } } } } }, "/repos/{space_name}/{repo_name}/watchers": { "get": { "tags": [ "repos" ], "description": "分页列出仓库关注者,并可按关注模式过滤。", "operationId": "list_watchers", "parameters": [ { "name": "space_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", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "mode", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/WatchMode" } ] } } ], "responses": { "200": { "description": "list watchers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_WatcherDto" } } } } } } }, "/spaces": { "get": { "tags": [ "space" ], "summary": "列示我加入的组织", "description": "默认只返回 ACTIVE 组织;`include_archived=true` 时一并返回已归档组织。", "operationId": "space_list", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "include_archived", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "组织列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_OrganizationSummary" } } } }, "401": { "description": "会话未绑定账号", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "summary": "新建组织", "description": "创建者自动成为 OWNER 并写入 owner/admin/member 三个内置角色。slug 全局唯一且只允许小写字母、数字与连字符。", "operationId": "space_create", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrganizationBody" } } }, "required": true }, "responses": { "200": { "description": "组织已创建", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "401": { "description": "会话未绑定账号", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "slug 已被占用", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/explore": { "get": { "tags": [ "space" ], "description": "分页列出公开的活跃空间;已登录时返回调用者的成员与申请状态。", "operationId": "explore_spaces", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "sort", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExploreSort" } ] } }, { "name": "order", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "explore public spaces", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_ExploreSpaceDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/invites/redeem": { "post": { "tags": [ "space" ], "summary": "兑换邀请", "description": "uses 递增与兑换记录写入同事务。定向邀请只能由目标用户兑换。", "operationId": "space_invite_redeem", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RedeemInviteBody" } } }, "required": true }, "responses": { "200": { "description": "已加入", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RedeemInviteResponse" } } } }, "403": { "description": "定向邀请目标不匹配", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "邀请已用尽", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}": { "get": { "tags": [ "space" ], "summary": "组织详情", "operationId": "space_get", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "组织详情", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "404": { "description": "组织不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "summary": "删除组织", "description": "仍存在活跃成员且未指定 `force=true` 时返回 409。删除会清理成员、角色与邀请。", "operationId": "space_delete", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "force", "in": "query", "description": "是否连成员一并清理", "required": false, "schema": { "type": "boolean" } }, { "name": "reason", "in": "query", "description": "删除原因,最长 512 字符", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "已删除", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_bool" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "仍有活跃成员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "summary": "修改组织", "description": "需要 `org.update`。`expected_version` 与当前 version 不一致时返回 409。", "operationId": "space_update", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrganizationBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "版本冲突", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/archive": { "post": { "tags": [ "space" ], "summary": "归档组织", "description": "需要 `org.archive`。归档后全部权限判定返回 false,可恢复。", "operationId": "space_archive", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReasonBody" } } }, "required": true }, "responses": { "200": { "description": "已归档", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/bans": { "get": { "tags": [ "space" ], "summary": "封禁列表", "description": "需要 `member.ban`。按封禁时间倒序。", "operationId": "space_ban_list", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "每页条数,默认 20,最多 100", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "跳过条数,最多 5000", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "封禁列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MemberSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/bans/{user_id}": { "get": { "tags": [ "space" ], "summary": "封禁详情", "description": "需要 `member.ban`。未封禁返回 404。", "operationId": "space_ban_get", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "description": "被封禁用户 id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "封禁详情", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "404": { "description": "未封禁或成员不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "summary": "按用户解封", "description": "需要 `member.ban`。等价于按会籍 id 解封,便于按用户维度操作。", "operationId": "space_ban_delete", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "description": "被解封用户 id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "已解封", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "404": { "description": "成员不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "summary": "更新封禁", "description": "需要 `member.ban`。改原因、到期时间与四个放行位;未封禁返回 404。", "operationId": "space_ban_update", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "description": "被封禁用户 id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBanBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "404": { "description": "未封禁或成员不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/cleanup": { "get": { "tags": [ "cleanup" ], "description": "列出空间内全部目录与对象(目录/仓库/问题集/频道),仅空间所有者可访问。", "operationId": "list_cleanup_objects", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "cleanup objects", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_CleanupObjectDto" } } } } } } }, "/spaces/{space_name}/cleanup/{kind}/{object_id}": { "delete": { "tags": [ "cleanup" ], "description": "删除对象:问题集/频道调用各自模块的清理逻辑,纯目录节点需为空;仓库只能用归档。", "operationId": "delete_cleanup_object", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "description": "object kind", "required": true, "schema": { "type": "string" } }, { "name": "object_id", "in": "path", "description": "dir id or room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/cleanup/{kind}/{object_id}/archive": { "post": { "tags": [ "cleanup" ], "description": "归档 / 取消归档仓库;仓库没有硬删除,危险区用归档表达下架。", "operationId": "set_cleanup_archive", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "description": "object kind", "required": true, "schema": { "type": "string" } }, { "name": "object_id", "in": "path", "description": "dir id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetRepoArchivedCmd" } } }, "required": true }, "responses": { "200": { "description": "updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/cleanup/{kind}/{object_id}/overwrites": { "delete": { "tags": [ "cleanup" ], "description": "清除目录节点上的全部可见性覆盖(group + user),恢复继承默认可见性。", "operationId": "clear_cleanup_overwrites", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "description": "object kind", "required": true, "schema": { "type": "string" } }, { "name": "object_id", "in": "path", "description": "dir id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "cleared", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/cleanup/{kind}/{object_id}/visibility": { "post": { "tags": [ "cleanup" ], "description": "调整对象可见性:仓库与频道支持私有/公开,其余类型不支持。", "operationId": "set_cleanup_visibility", "parameters": [ { "name": "space_name", "in": "path", "description": "space name", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "description": "object kind", "required": true, "schema": { "type": "string" } }, { "name": "object_id", "in": "path", "description": "dir id or room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetCleanupVisibilityCmd" } } }, "required": true }, "responses": { "200": { "description": "updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir": { "get": { "tags": [ "space" ], "description": "按用户与群组覆写权限返回目录树或指定层级的子树。", "operationId": "get_space_dir_tree", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "parent_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } } ], "responses": { "200": { "description": "get space dir tree", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_DirNodeDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "description": "在空间目录树中创建目录节点。", "operationId": "create_dir_node", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDirCmd" } } }, "required": true }, "responses": { "200": { "description": "dir node created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DirNodeDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space or parent not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/repair-parents": { "post": { "tags": [ "space" ], "description": "拥有者修复目录树中的悬空父引用和循环结构。", "operationId": "repair_dir_parents", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "repair dir parents", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RepairDirResp" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "resource already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}": { "patch": { "tags": [ "space" ], "description": "重命名空间目录节点。", "operationId": "update_dir_node", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDirCmd" } } }, "required": true }, "responses": { "200": { "description": "dir node updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DirNodeDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "dir node not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}/overwrites/groups": { "get": { "tags": [ "space" ], "description": "列出目录节点上的群组权限覆写。", "operationId": "list_dir_group_overwrites", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list dir group overwrites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_GroupOverwriteDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space or dir not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}/overwrites/groups/{group_id}": { "put": { "tags": [ "space" ], "description": "设置目录节点针对群组的允许与拒绝权限位。", "operationId": "set_dir_group_overwrite", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOverwriteCmd" } } }, "required": true }, "responses": { "200": { "description": "set dir group overwrite", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_GroupOverwriteDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "description": "移除目录节点的指定群组权限覆写。", "operationId": "remove_dir_group_overwrite", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "remove dir group overwrite", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}/overwrites/users": { "get": { "tags": [ "space" ], "description": "列出目录节点上的用户权限覆写。", "operationId": "list_dir_user_overwrites", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "list dir user overwrites", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_UserOverwriteDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space or dir not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}/overwrites/users/{user_id}": { "put": { "tags": [ "space" ], "description": "设置目录节点针对用户的允许与拒绝权限位。", "operationId": "set_dir_user_overwrite", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOverwriteCmd" } } }, "required": true }, "responses": { "200": { "description": "set dir user overwrite", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserOverwriteDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "description": "移除目录节点的指定用户权限覆写。", "operationId": "remove_dir_user_overwrite", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "remove dir user overwrite", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/dir/{dir_id}/position": { "patch": { "tags": [ "space" ], "description": "移动目录节点并防止父链自引用形成环。", "operationId": "move_dir_node", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "dir_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MoveDirCmd" } } }, "required": true }, "responses": { "200": { "description": "dir node moved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_DirNodeDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "dir node not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/groups": { "get": { "tags": [ "space" ], "description": "分页列出空间群组及权限;需要角色管理权限。", "operationId": "list_groups", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list space groups", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_GroupDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "description": "创建空间群组并为其授予合法权限集合。", "operationId": "create_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGroupCmd" } } }, "required": true }, "responses": { "200": { "description": "group created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_GroupDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "group name conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/groups/{group_id}": { "get": { "tags": [ "space" ], "description": "读取群组详情,并按空间可见性规则控制访问。", "operationId": "get_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "get group", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_GroupDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "group not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "description": "删除群组并清除成员分配和群组权限记录。", "operationId": "delete_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "group deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "description": "更新群组名称、图标、排序或整体权限集合。", "operationId": "update_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateGroupCmd" } } }, "required": true }, "responses": { "200": { "description": "group updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_GroupDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "group name conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/groups/{group_id}/join": { "post": { "tags": [ "space" ], "description": "在服务端允许时,当前有效成员自助加入群组。", "operationId": "join_group_self", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "joined group", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "already in group", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "description": "当前用户自助退出指定群组成员关系。", "operationId": "leave_group_self", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "left group", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/images/{kind}": { "get": { "tags": [ "space" ], "description": "读取空间指定类型图片的元数据与访问地址。", "operationId": "get_space_image", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/SpaceImageKind" } } ], "responses": { "200": { "description": "get space image", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Option_SpaceImageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "put": { "tags": [ "space" ], "description": "上传原始图片字节作为空间头像、横幅、邀请图或嵌入图并更新空间元数据。", "operationId": "upload_space_image", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/SpaceImageKind" } }, { "name": "width", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int32" } }, { "name": "height", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int32" } } ], "requestBody": { "description": "raw image bytes (image/jpeg, image/png, image/webp, image/gif)", "content": { "image/png": { "schema": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } } }, "required": true }, "responses": { "200": { "description": "space image uploaded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_SpaceImageDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "description": "删除空间指定类型图片并清空对应元数据。", "operationId": "delete_space_image", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/SpaceImageKind" } } ], "responses": { "200": { "description": "space image deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/images/{kind}/file": { "get": { "tags": [ "space" ], "description": "重定向到 S3 预签名空间图片链接(1 小时有效, Redis 缓存 48 分钟)。默认返回压缩后的预览图,`?variant=original` 返回上传原图。私有社区对非成员返回 404。", "operationId": "get_space_image_file", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "kind", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/SpaceImageKind" } }, { "name": "variant", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ImageVariant" } ] } } ], "responses": { "302": { "description": "redirect to presigned s3 space image url" }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space or image not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/invites": { "get": { "tags": [ "space" ], "summary": "列示邀请", "description": "需要 `invite.view`。不含 token 明文。", "operationId": "space_invite_list", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "每页条数,默认 20,最多 100", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "跳过条数,最多 5000", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "include_revoked", "in": "query", "description": "包含已撤销邀请", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "邀请列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_InviteSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "summary": "创建邀请", "description": "需要 `invite.create`。明文 token 只在创建响应里返回一次,之后只存 sha256。", "operationId": "space_invite_create", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInviteBody" } } }, "required": true }, "responses": { "200": { "description": "邀请已创建", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_CreateInviteResponse" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/invites/{invite_id}": { "delete": { "tags": [ "space" ], "summary": "撤销邀请", "description": "需要 `invite.revoke`。已撤销的邀请再次撤销返回 false。", "operationId": "space_invite_revoke", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "invite_id", "in": "path", "description": "邀请 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已撤销", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_bool" } } } }, "404": { "description": "邀请不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-requests": { "get": { "tags": [ "space" ], "description": "分页列出空间的加入申请,需要成员管理权限。", "operationId": "list_join_requests", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "status", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceJoinRequestState" } ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list join requests", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_JoinRequestDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "description": "提交一条加入公开空间的申请,可附一段说明。", "operationId": "create_join_request", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateJoinRequestCmd" } } }, "required": true }, "responses": { "200": { "description": "join request submitted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_JoinRequestDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "join not allowed or requirement not met", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "already a member or request already pending", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "429": { "description": "rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-requests/{request_id}": { "delete": { "tags": [ "space" ], "description": "申请人撤回自己待审批的加入申请。", "operationId": "withdraw_join_request", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "join request withdrawn", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "join request is not pending", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-requests/{request_id}/approve": { "post": { "tags": [ "space" ], "description": "通过一条待审批的加入申请并把申请人加入空间,需要成员管理权限。", "operationId": "approve_join_request", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "join request approved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_JoinRequestDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "join request is not pending", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-requests/{request_id}/reject": { "post": { "tags": [ "space" ], "description": "驳回一条待审批的加入申请,需要成员管理权限。", "operationId": "reject_join_request", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "join request rejected", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_JoinRequestDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "join request is not pending", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-rules": { "get": { "tags": [ "space" ], "description": "列出空间的自动入群规则。", "operationId": "list_join_rules", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list space join rules", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_JoinRuleDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "space not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "description": "创建根据议题事件自动授予群组成员身份的规则。", "operationId": "create_join_rule", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateJoinRuleCmd" } } }, "required": true }, "responses": { "200": { "description": "join rule created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_JoinRuleDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/join-rules/{rule_id}": { "delete": { "tags": [ "space" ], "description": "删除指定的空间自动入群规则。", "operationId": "delete_join_rule", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "join rule deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "description": "更新自动入群规则的启用状态或匹配条件。", "operationId": "update_join_rule", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "rule_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateJoinRuleCmd" } } }, "required": true }, "responses": { "200": { "description": "join rule updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_JoinRuleDto" } } } }, "400": { "description": "bad request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/leave": { "post": { "tags": [ "space" ], "summary": "退出组织", "description": "OWNER 必须先转移所有权,否则返回 409。", "operationId": "space_leave", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "已退出", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_bool" } } } }, "409": { "description": "OWNER 需先转移所有权", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members": { "get": { "tags": [ "space" ], "summary": "列示组织成员", "description": "需要 `member.view`。默认只返回活跃成员。", "operationId": "space_member_list", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "每页条数,默认 20,最多 100", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "description": "跳过条数,最多 5000", "required": false, "schema": { "type": "integer", "format": "int64", "minimum": 0 } }, { "name": "include_inactive", "in": "query", "description": "包含已退出成员", "required": false, "schema": { "type": "boolean" } }, { "name": "include_banned", "in": "query", "description": "包含已封禁成员", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "成员列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_MemberSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "summary": "直接添加成员", "description": "需要 `member.add`。已退出的会籍按复活处理,已封禁的返回 403。", "operationId": "space_member_add", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddMemberBody" } } }, "required": true }, "responses": { "200": { "description": "成员已添加", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "权限不足或成员已封禁", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "用户不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/@me": { "patch": { "tags": [ "space" ], "summary": "更新自己的会籍资料", "description": "只允许修改自己的别名、头像与通知偏好;无需 `member.role.update`。", "operationId": "space_member_update_self", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMemberBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "不是活跃成员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{member_id}": { "get": { "tags": [ "space" ], "summary": "成员详情", "description": "需要 `member.view`。包含别名、通知偏好与封禁附加信息。", "operationId": "space_member_get", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "成员详情", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "404": { "description": "成员不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "summary": "移除成员", "description": "需要 `member.remove`。OWNER 不能移除,需先转移所有权。会籍行保留用于复活。", "operationId": "space_member_remove", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "reason", "in": "query", "description": "移除原因", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "已移除", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_bool" } } } }, "403": { "description": "权限不足或目标是 OWNER", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "summary": "更新成员资料", "description": "需要 `member.role.update`。修改别名、头像、通知偏好与免打扰;封禁中的会籍走封禁接口。", "operationId": "space_member_update", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMemberBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "权限不足或目标已封禁", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "版本冲突", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{member_id}/ban": { "post": { "tags": [ "space" ], "summary": "封禁成员", "description": "写 banned_at 并清空角色绑定与直挂权限。封禁优先于一切授权。", "operationId": "space_member_ban", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BanMemberBody" } } }, "required": true }, "responses": { "200": { "description": "已封禁", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{member_id}/permissions": { "put": { "tags": [ "space" ], "summary": "设置成员直挂权限", "description": "整表替换语义。需要 `role.permission.update`,OWNER 不接受直挂覆盖。", "operationId": "space_member_permissions", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetRolePermissionsBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_String" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{member_id}/role": { "patch": { "tags": [ "space" ], "summary": "改粗粒度角色", "description": "只接受 MEMBER 与 ADMIN。OWNER 只能通过转移所有权变更。", "operationId": "space_member_role", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetMemberRoleBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "版本冲突", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{member_id}/unban": { "post": { "tags": [ "space" ], "summary": "解封成员", "description": "清空 banned_at。已清空的角色不会自动恢复。", "operationId": "space_member_unban", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "member_id", "in": "path", "description": "会籍 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已解封", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{user_id}/groups": { "post": { "tags": [ "space" ], "description": "管理员将空间成员分配到指定群组。", "operationId": "assign_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignGroupCmd" } } }, "required": true }, "responses": { "200": { "description": "group assigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "409": { "description": "already assigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/members/{user_id}/groups/{group_id}": { "delete": { "tags": [ "space" ], "description": "管理员移除成员的群组分配,未分配时幂等成功。", "operationId": "unassign_group", "parameters": [ { "name": "space_name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "user_id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "group unassigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "403": { "description": "forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/permissions/check": { "post": { "tags": [ "space" ], "summary": "单权限判定", "description": "拒绝不作为错误返回:`allowed=false` 附 `reason` 与 `matched_by`,便于调用方聚合。", "operationId": "space_permission_check", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CheckPermissionBody" } } }, "required": true }, "responses": { "200": { "description": "判定结果", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_PermissionCheck" } } } }, "403": { "description": "查询他人权限但不是平台管理员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/restore": { "post": { "tags": [ "space" ], "summary": "恢复归档组织", "description": "仅 OWNER 或平台管理员可执行。", "operationId": "space_restore", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "已恢复", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles": { "get": { "tags": [ "space" ], "summary": "列示组织角色", "description": "需要 `role.view`。含内置 owner/admin/member 三个系统角色。", "operationId": "space_role_list", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "角色列表", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_RoleSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "post": { "tags": [ "space" ], "summary": "新建角色", "description": "需要 `role.create`。key 在组织内唯一,权限键必须在白名单内。", "operationId": "space_role_create", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRoleBody" } } }, "required": true }, "responses": { "200": { "description": "角色已创建", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoleSummary" } } } }, "409": { "description": "key 已占用", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles/assign": { "post": { "tags": [ "space" ], "summary": "绑定角色到成员", "description": "需要 `role.assign`。重复绑定幂等。", "operationId": "space_role_assign", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignRoleBody" } } }, "required": true }, "responses": { "200": { "description": "已绑定", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_String" } } } }, "404": { "description": "成员或角色不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles/unassign": { "post": { "tags": [ "space" ], "summary": "解绑成员角色", "description": "需要 `role.assign`。系统角色不可解绑。", "operationId": "space_role_unassign", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignRoleBody" } } }, "required": true }, "responses": { "200": { "description": "已解绑", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_String" } } } }, "403": { "description": "系统角色不可解绑", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles/{role_id}": { "get": { "tags": [ "space" ], "summary": "角色详情", "description": "需要 `role.view`。", "operationId": "space_role_get", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "角色详情", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoleSummary" } } } }, "404": { "description": "角色不存在", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "summary": "删除角色", "description": "需要 `role.delete`。系统角色不可删;仍有成员绑定时返回 409。", "operationId": "space_role_delete", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已删除", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_bool" } } } }, "409": { "description": "系统角色或仍被绑定", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "patch": { "tags": [ "space" ], "summary": "修改角色", "description": "需要 `role.update`。OWNER 系统角色不允许改 rank 与 default_role。", "operationId": "space_role_update", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRoleBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoleSummary" } } } }, "409": { "description": "版本冲突", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles/{role_id}/join": { "post": { "tags": [ "space" ], "summary": "自助加入角色", "description": "只允许 `self_assignable = true` 的非内置角色。", "operationId": "space_role_join", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已加入", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "角色不可自助加入或不是活跃成员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } }, "delete": { "tags": [ "space" ], "summary": "自助退出角色", "description": "只允许 `self_assignable = true` 的非内置角色;重复退出视为成功。", "operationId": "space_role_leave", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "已退出", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_MemberSummary" } } } }, "403": { "description": "角色不可自助加入或不是活跃成员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/roles/{role_id}/permissions": { "put": { "tags": [ "space" ], "summary": "设置角色权限", "description": "整体替换语义,是角色权限的唯一写入口。需要 `role.permission.update`。", "operationId": "space_role_permissions", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } }, { "name": "role_id", "in": "path", "description": "角色 id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetRolePermissionsBody" } } }, "required": true }, "responses": { "200": { "description": "已更新", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_RoleSummary" } } } }, "403": { "description": "权限不足或系统 OWNER 角色", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/spaces/{space_name}/transfer": { "post": { "tags": [ "space" ], "summary": "转移 OWNER", "description": "目标必须是活跃成员。原 Owner 降为 ADMIN。", "operationId": "space_transfer", "parameters": [ { "name": "space_name", "in": "path", "description": "空间 slug", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferBody" } } }, "required": true }, "responses": { "200": { "description": "已转移", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_OrganizationSummary" } } } }, "403": { "description": "权限不足", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "目标不是活跃成员", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/topics": { "get": { "tags": [ "topics" ], "description": "分页列出系统全部标签。", "operationId": "list_topics", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "list topics", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_TopicDto" } } } } } }, "post": { "tags": [ "topics" ], "description": "创建全局标签;同名时幂等返回已有标签。", "operationId": "create_topic", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTopicCmd" } } }, "required": true }, "responses": { "200": { "description": "create topic", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TopicDto" } } } } } } }, "/topics/{name}": { "get": { "tags": [ "topics" ], "description": "按名称读取单个标签。", "operationId": "get_topic", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "get topic", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_TopicDto" } } } } } } }, "/topics/{name}/repos": { "get": { "tags": [ "topics" ], "description": "分页列出关联某标签的仓库记录。", "operationId": "list_repos_by_topic", "parameters": [ { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "repos using topic", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Page_TopicRepoDto" } } } } } } }, "/users": { "get": { "tags": [ "users" ], "description": "按 ID 批量解析用户公开资料,并自动隐藏不可见账号。", "operationId": "list_users_batch", "parameters": [ { "name": "ids", "in": "query", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int64" } } } ], "responses": { "200": { "description": "resolved public identities", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_Vec_UserPublic" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/users/by-username/{username}": { "get": { "tags": [ "users" ], "description": "按用户名精确查询用户公开资料,并遵循可见性规则。", "operationId": "get_user_by_username", "parameters": [ { "name": "username", "in": "path", "description": "username", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "public user identity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserPublic" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/users/{user_id}": { "get": { "tags": [ "users" ], "description": "按用户 ID 返回公开身份资料,并按账号状态与可见性过滤。", "operationId": "get_user", "parameters": [ { "name": "user_id", "in": "path", "description": "user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "public user identity", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_UserPublic" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/users/{user_id}/avatar": { "get": { "tags": [ "users" ], "description": "重定向到 S3 预签名头像链接(24 小时有效, Redis 缓存)。默认返回压缩后的预览图,`?variant=original` 返回上传原图。头像不受资料可见性限制:聊天与成员列表依赖它辨认发言人。", "operationId": "get_user_avatar", "parameters": [ { "name": "user_id", "in": "path", "description": "user id", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "variant", "in": "query", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ImageVariant" } ] } } ], "responses": { "302": { "description": "redirect to presigned s3 avatar url" }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } }, "404": { "description": "user not found or has no avatar", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } }, "/users/{user_id}/profile-detail": { "get": { "tags": [ "user" ], "description": "按资料可见性与字段开关读取用户公开资料详情。", "operationId": "get_profile_detail", "parameters": [ { "name": "user_id", "in": "path", "description": "target user id", "required": true, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "user profile detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_ProfileDetailDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Envelope_NoData" } } } } } } } }, "components": { "schemas": { "AcceptAgreementCmd": { "type": "object", "required": [ "version" ], "properties": { "version": { "type": "string" } } }, "AcceptAgreementResp": { "type": "object", "required": [ "recorded" ], "properties": { "recorded": { "type": "boolean" } } }, "AccountDeletionDto": { "type": "object", "required": [ "status", "requested_at", "purge_after" ], "properties": { "last_error": { "type": [ "string", "null" ] }, "purge_after": { "type": "string", "format": "date-time" }, "requested_at": { "type": "string", "format": "date-time" }, "status": { "type": "string" } } }, "AddBranchWhitelistCmd": { "type": "object", "required": [ "kind" ], "properties": { "group_id": { "type": [ "string", "null" ], "format": "uuid" }, "kind": { "$ref": "#/components/schemas/WhitelistKind" }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "AddMemberBody": { "type": "object", "required": [ "user_id" ], "properties": { "role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceMemberRole" } ] }, "role_keys": { "type": "array", "items": { "type": "string" } }, "user_id": { "type": "integer", "format": "int64" } } }, "AddTagWhitelistCmd": { "type": "object", "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "format": "int64" } } }, "AgreementDoc": { "type": "object", "required": [ "key", "version", "title", "content_md" ], "properties": { "content_md": { "type": "string" }, "key": { "type": "string" }, "title": { "type": "string" }, "version": { "type": "string" } } }, "AllowJoinLevel": { "type": "string", "description": "允许加入的历史开关,映射 `spaces.allow_join_level`。", "enum": [ "None", "NeedMailActive", "NeedMailActiveAndLastOneMid", "NeedMailActiveAndLastOneHours", "NeedMailActiveAndPhoneActive" ] }, "AppliedPatchDto": { "type": "object", "required": [ "applied", "conflicts" ], "properties": { "applied": { "type": "boolean" }, "conflicts": { "type": "array", "items": { "type": "string" } } } }, "ArchiveCreateCmd": { "type": "object", "required": [ "revision", "format" ], "properties": { "format": { "$ref": "#/components/schemas/ArchiveFormatDto" }, "path_filter": { "type": [ "string", "null" ] }, "revision": { "type": "string" } } }, "ArchiveFormatDto": { "type": "string", "enum": [ "tar", "tar_gz", "tar_bz2", "zip" ] }, "ArchiveResultDto": { "type": "object", "required": [ "format", "size", "cache_key" ], "properties": { "cache_key": { "type": "string" }, "download_url": { "type": [ "string", "null" ] }, "format": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "AssignCmd": { "type": "object", "required": [ "user" ], "properties": { "user": { "type": "string", "description": "用户名或 UUID。" } } }, "AssignGroupCmd": { "type": "object", "required": [ "group_id" ], "properties": { "group_id": { "type": "string", "format": "uuid" } } }, "AssignRoleBody": { "type": "object", "required": [ "member_id", "role_key" ], "properties": { "member_id": { "type": "string", "format": "uuid" }, "role_key": { "type": "string" } } }, "AttachLabelCmd": { "type": "object", "required": [ "label" ], "properties": { "label": { "type": "string", "description": "标签 UUID 或名称(同一仓库目录内的标签)。" } } }, "AttachmentDto": { "type": "object", "required": [ "id", "user_id", "filename", "content_type", "size", "status", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "duration_secs": { "type": [ "integer", "null" ], "format": "int32" }, "filename": { "type": "string" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": [ "string", "null" ], "format": "uuid" }, "size": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/AttachmentStatus" }, "user_id": { "type": "integer", "format": "int64" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "AttachmentStatus": { "type": "string", "enum": [ "Pending", "Uploaded" ] }, "Audience": { "type": "string", "enum": [ "Everyone", "FollowingOnly", "Nobody" ] }, "AuthorType": { "type": "string", "enum": [ "User", "Bot", "Webhook" ] }, "AvatarDto": { "type": "object", "required": [ "user_id", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "description": "Size of the uploaded original in bytes.", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat", "description": "Format of the uploaded original." }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string", "description": "Browser-facing URL. Points at the compressed derivative when one exists,\nand at the uploaded bytes otherwise." }, "user_id": { "type": "integer", "format": "int64" } } }, "AvatarFormat": { "type": "string", "enum": [ "jpg", "png", "webp", "gif" ] }, "BanMemberBody": { "type": "object", "properties": { "reason": { "type": [ "string", "null" ] } } }, "BlameRangeDto": { "type": "object", "required": [ "starting_line", "ending_line", "commit_sha", "abbreviated_oid" ], "properties": { "abbreviated_oid": { "type": "string" }, "commit_sha": { "type": "string" }, "ending_line": { "type": "integer", "format": "int32" }, "path": { "type": [ "string", "null" ] }, "starting_line": { "type": "integer", "format": "int32" } } }, "BlobContentDto": { "type": "object", "required": [ "oid", "data", "size", "is_binary", "truncated" ], "properties": { "data": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } }, "is_binary": { "type": "boolean" }, "oid": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "truncated": { "type": "boolean" } } }, "BlobMetaDto": { "type": "object", "required": [ "oid", "size", "is_binary", "is_lfs_pointer" ], "properties": { "is_binary": { "type": "boolean" }, "is_lfs_pointer": { "type": "boolean" }, "lfs": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LfsPointerDto" } ] }, "oid": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "BoardDto": { "type": "object", "required": [ "id", "dir_id", "name", "open_issues_count", "closed_issues_count", "created_at" ], "properties": { "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "open_issues_count": { "type": "integer", "format": "int64" }, "prefix": { "type": [ "string", "null" ], "description": "Number prefix for the board's issues (`CAD` renders as `CAD-12`)." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "BoardPath": { "type": "object", "required": [ "space_name", "board_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "BookmarkDto": { "type": "object", "required": [ "id", "room_id", "title", "position", "created_by_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "emoji": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "url": { "type": [ "string", "null" ] } } }, "BranchDto": { "type": "object", "required": [ "name", "commit_sha", "is_protected", "is_deleted", "created_at", "updated_at" ], "properties": { "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_deleted": { "type": "boolean" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "BranchInfoDto": { "type": "object", "required": [ "name", "commit_sha", "is_protected" ], "properties": { "commit_message": { "type": [ "string", "null" ] }, "commit_sha": { "type": "string" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" } } }, "BranchPolicyDto": { "type": "object", "required": [ "id", "repo_id", "branch_pattern", "enable_push", "enable_push_whitelist", "push_whitelist_deploy_keys", "enable_merge_whitelist", "required_approvals", "enable_approvals_whitelist", "block_on_rejected_reviews", "block_on_change_requested_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "unprotected_file_patterns", "enable_force_push", "required_status_contexts", "created_at", "updated_at" ], "properties": { "block_on_change_requested_reviews": { "type": "boolean" }, "block_on_outdated_branch": { "type": "boolean" }, "block_on_rejected_reviews": { "type": "boolean" }, "branch_pattern": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "dismiss_stale_approvals": { "type": "boolean" }, "enable_approvals_whitelist": { "type": "boolean" }, "enable_force_push": { "type": "boolean" }, "enable_merge_whitelist": { "type": "boolean" }, "enable_push": { "type": "boolean" }, "enable_push_whitelist": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "protected_file_patterns": { "type": "string" }, "push_whitelist_deploy_keys": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "require_signed_commits": { "type": "boolean" }, "required_approvals": { "type": "integer", "format": "int32" }, "required_status_contexts": { "type": "string" }, "unprotected_file_patterns": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "BranchPolicyFlags": { "type": "object", "properties": { "block_on_change_requested_reviews": { "type": [ "boolean", "null" ] }, "block_on_outdated_branch": { "type": [ "boolean", "null" ] }, "block_on_rejected_reviews": { "type": [ "boolean", "null" ] }, "dismiss_stale_approvals": { "type": [ "boolean", "null" ] }, "enable_approvals_whitelist": { "type": [ "boolean", "null" ] }, "enable_force_push": { "type": [ "boolean", "null" ] }, "enable_merge_whitelist": { "type": [ "boolean", "null" ] }, "enable_push": { "type": [ "boolean", "null" ] }, "enable_push_whitelist": { "type": [ "boolean", "null" ] }, "protected_file_patterns": { "type": [ "string", "null" ] }, "require_signed_commits": { "type": [ "boolean", "null" ] }, "required_approvals": { "type": [ "integer", "null" ], "format": "int32" }, "required_status_contexts": { "type": [ "string", "null" ] }, "unprotected_file_patterns": { "type": [ "string", "null" ] } } }, "BranchWhitelistDto": { "type": "object", "required": [ "id", "policy_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "group_id": { "type": [ "string", "null" ], "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/WhitelistKind" }, "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "BulkAction": { "type": "string", "enum": [ "close", "reopen" ] }, "BulkDeleteCmd": { "type": "object", "required": [ "message_ids" ], "properties": { "message_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "BulkIssuesCmd": { "type": "object", "required": [ "action", "issue_refs" ], "properties": { "action": { "$ref": "#/components/schemas/BulkAction" }, "issue_refs": { "type": "array", "items": { "type": "string" } } } }, "BulkResultDto": { "type": "object", "required": [ "updated" ], "properties": { "updated": { "type": "integer", "format": "int64", "minimum": 0 } } }, "CallerSignatureBody": { "type": "object", "properties": { "when": { "type": [ "string", "null" ] } } }, "ChallengeResponse": { "type": "object", "required": [ "context", "difficulty", "issued_at", "expires_at" ], "properties": { "context": { "type": "string" }, "difficulty": { "type": "integer", "format": "int32", "minimum": 0 }, "expires_at": { "type": "integer", "format": "int64", "minimum": 0 }, "issued_at": { "type": "integer", "format": "int64", "minimum": 0 } } }, "ChangePasswordCmd": { "type": "object", "required": [ "old_password", "new_password" ], "properties": { "new_password": { "type": "string" }, "old_password": { "type": "string" } } }, "ChangedPathDiffDto": { "type": "object", "required": [ "path", "lines_added", "lines_removed", "binary" ], "properties": { "binary": { "type": "boolean" }, "lines_added": { "type": "integer", "format": "int64", "minimum": 0 }, "lines_removed": { "type": "integer", "format": "int64", "minimum": 0 }, "patch": { "type": [ "string", "null" ] }, "path": { "$ref": "#/components/schemas/ChangedPathDto" } } }, "ChangedPathDto": { "type": "object", "required": [ "new_path", "old_mode", "new_mode", "status" ], "properties": { "new_mode": { "type": "integer", "format": "int32", "minimum": 0 }, "new_oid": { "type": [ "string", "null" ] }, "new_path": { "type": "string" }, "old_mode": { "type": "integer", "format": "int32", "minimum": 0 }, "old_oid": { "type": [ "string", "null" ] }, "old_path": { "type": [ "string", "null" ] }, "status": { "type": "string" } } }, "ChatMessageType": { "type": "string", "enum": [ "Default", "Reply", "ThreadCreated", "ChannelJoin", "ChannelLeave", "ChannelTopic", "ChannelPinnedItem", "Reminder", "System" ] }, "CheckPermissionBody": { "type": "object", "required": [ "permission" ], "properties": { "permission": { "type": "string" }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "CleanupObjectDto": { "type": "object", "required": [ "id", "kind", "name", "path", "is_archived", "child_count", "overwrite_count" ], "properties": { "child_count": { "type": "integer", "format": "int64", "description": "目录的子节点数 / 频道的子频道数。" }, "id": { "type": "string", "format": "uuid", "description": "`dirs.id`(目录/仓库/问题集/智能体集)或 `rooms.id`(频道)。" }, "is_archived": { "type": "boolean" }, "is_private": { "type": [ "boolean", "null" ], "description": "仅仓库与频道有可见性开关。" }, "kind": { "type": "string", "description": "`dir | object | repo | board | text | voice | stage | category | news | guild_room`" }, "name": { "type": "string" }, "overwrite_count": { "type": "integer", "format": "int64", "description": "目录上的权限覆盖条数(group + user)。" }, "path": { "type": "string", "description": "父链拼出的可读路径,例如 `bots / 研究研究`。" } } }, "CodeActivityAuthorDto": { "type": "object", "required": [ "name", "email", "commits", "additions", "deletions" ], "properties": { "additions": { "type": "integer", "format": "int64" }, "commits": { "type": "integer", "format": "int64" }, "deletions": { "type": "integer", "format": "int64" }, "email": { "type": "string" }, "name": { "type": "string" } } }, "CodeActivityDto": { "type": "object", "required": [ "authors", "total_commits", "total_additions", "total_deletions" ], "properties": { "authors": { "type": "array", "items": { "$ref": "#/components/schemas/CodeActivityAuthorDto" } }, "total_additions": { "type": "integer", "format": "int64" }, "total_commits": { "type": "integer", "format": "int64" }, "total_deletions": { "type": "integer", "format": "int64" } } }, "CodeCommentDto": { "type": "object", "required": [ "id", "repo_id", "path", "line", "commit_sha", "body", "resolved", "outdated", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": "integer", "format": "int32" }, "outdated": { "type": "boolean", "description": "该评论锚定的提交是否仍是当前分支提示(否则视为 outdated)。" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "CommentDto": { "type": "object", "required": [ "id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "poster": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "CommentPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "comment_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "comment_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "CommentReactionPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "comment_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "comment_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "CommentSort": { "type": "string", "enum": [ "created_at", "updated_at" ] }, "CommentTreeNode": { "type": "object", "required": [ "comment", "replies" ], "properties": { "comment": { "$ref": "#/components/schemas/CommentDto" }, "replies": { "type": "array", "items": { "$ref": "#/components/schemas/CommentTreeNode" } } } }, "CommitDto": { "type": "object", "required": [ "id", "tree_id", "parents", "author_name", "author_email", "author_time", "committer_name", "committer_email", "committer_time", "message" ], "properties": { "author_email": { "type": "string" }, "author_name": { "type": "string" }, "author_time": { "type": "integer", "format": "int64" }, "committer_email": { "type": "string" }, "committer_name": { "type": "string" }, "committer_time": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "tree_id": { "type": "string" } } }, "CommitObjectBody": { "type": "object", "required": [ "kind", "parents", "tree", "message", "author", "committer" ], "properties": { "author": { "$ref": "#/components/schemas/SignatureDto" }, "committer": { "$ref": "#/components/schemas/SignatureDto" }, "kind": { "$ref": "#/components/schemas/ObjectKind" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "tree": { "type": "string" } } }, "CommitStatusDto": { "type": "object", "required": [ "state", "context", "creator_id", "created_at" ], "properties": { "context": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "creator_id": { "type": "integer", "format": "int64" }, "description": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/CommitStatusDtoState" }, "target_url": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "CommitStatusDtoState": { "type": "string", "enum": [ "pending", "success", "failure", "error" ] }, "CommitStatusState": { "type": "string", "enum": [ "Pending", "Success", "Failure", "Error" ] }, "CommitSyncResponse": { "type": "object", "required": [ "repo_id", "sha" ], "properties": { "repo_id": { "type": "string" }, "sha": { "type": "string" } } }, "ConflictDetailDto": { "type": "object", "required": [ "path" ], "properties": { "content": { "type": [ "string", "null" ] }, "path": { "type": "string" } } }, "ContentHistoryDto": { "type": "object", "required": [ "id", "issue_id", "edited_at", "created_at" ], "properties": { "comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "content_after": { "type": [ "string", "null" ] }, "content_before": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "edited_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "poster": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "ContentHistoryPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "ContributorStatDto": { "type": "object", "required": [ "name", "email", "commits", "additions", "deletions" ], "properties": { "additions": { "type": "integer", "format": "int64" }, "commits": { "type": "integer", "format": "int64" }, "deletions": { "type": "integer", "format": "int64" }, "email": { "type": "string" }, "name": { "type": "string" } } }, "CountResp": { "type": "object", "required": [ "count" ], "properties": { "count": { "type": "integer", "format": "int64" } } }, "CreateAttachmentCmd": { "type": "object", "required": [ "filename", "content_type", "size" ], "properties": { "content_type": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "filename": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "CreateBoardCmd": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": [ "string", "null" ] }, "icon": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "prefix": { "type": [ "string", "null" ] } } }, "CreateBookmarkCmd": { "type": "object", "required": [ "title" ], "properties": { "emoji": { "type": [ "string", "null" ] }, "title": { "type": "string" }, "url": { "type": [ "string", "null" ] } } }, "CreateBranchCmd": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "start_point": { "type": [ "string", "null" ] } } }, "CreateBranchPolicyCmd": { "type": "object", "description": "分支保护策略的创建请求。\n\n字段与 [`BranchPolicyFlags`] 一一对应,但刻意不使用 `#[serde(flatten)]`:\n扁平化会让 utoipa 生成 `allOf` 组合,而 web 端 API 生成器无法处理该形状。", "required": [ "branch_pattern" ], "properties": { "block_on_change_requested_reviews": { "type": [ "boolean", "null" ] }, "block_on_outdated_branch": { "type": [ "boolean", "null" ] }, "block_on_rejected_reviews": { "type": [ "boolean", "null" ] }, "branch_pattern": { "type": "string" }, "dismiss_stale_approvals": { "type": [ "boolean", "null" ] }, "enable_approvals_whitelist": { "type": [ "boolean", "null" ] }, "enable_force_push": { "type": [ "boolean", "null" ] }, "enable_merge_whitelist": { "type": [ "boolean", "null" ] }, "enable_push": { "type": [ "boolean", "null" ] }, "enable_push_whitelist": { "type": [ "boolean", "null" ] }, "protected_file_patterns": { "type": [ "string", "null" ] }, "require_signed_commits": { "type": [ "boolean", "null" ] }, "required_approvals": { "type": [ "integer", "null" ], "format": "int32" }, "required_status_contexts": { "type": [ "string", "null" ] }, "unprotected_file_patterns": { "type": [ "string", "null" ] } } }, "CreateCodeCommentCmd": { "type": "object", "required": [ "path", "line", "body" ], "properties": { "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ], "description": "锚定的提交;缺省使用该 revision 解析出的提交。" }, "line": { "type": "integer", "format": "int32" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": "string" }, "revision": { "type": [ "string", "null" ] } } }, "CreateCommentCmd": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "CreateDependencyCmd": { "type": "object", "required": [ "dependency_id" ], "properties": { "dependency_id": { "type": "string", "format": "uuid" } } }, "CreateDirCmd": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": [ "integer", "null" ], "format": "int64" } } }, "CreateGroupCmd": { "type": "object", "required": [ "name" ], "properties": { "color": { "type": [ "string", "null" ] }, "icon_hash": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "position": { "type": [ "integer", "null" ], "format": "int64" }, "unicode_emoji": { "type": [ "string", "null" ] } } }, "CreateInviteBody": { "type": "object", "properties": { "max_uses": { "type": "integer", "format": "int32" }, "role_id": { "type": [ "string", "null" ], "format": "uuid" }, "target_user_id": { "type": [ "integer", "null" ], "format": "int64" }, "ttl_secs": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } }, "CreateInviteResponse": { "type": "object", "required": [ "invite", "token" ], "properties": { "invite": { "$ref": "#/components/schemas/InviteSummary" }, "token": { "type": "string" } } }, "CreateIssueAttachmentCmd": { "type": "object", "required": [ "space_name", "filename", "content_type", "size" ], "properties": { "content_type": { "type": "string" }, "filename": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "space_name": { "type": "string", "description": "Checked for membership so unbound uploads are still space-scoped." } } }, "CreateIssueCmd": { "type": "object", "required": [ "title" ], "properties": { "assignee_ids": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "attachment_ids": { "type": "array", "items": { "type": "string", "format": "uuid" }, "description": "Draft uploads (`POST /issues/attachments`) to link to the new issue." }, "content": { "type": "string" }, "description": { "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": { "$ref": "#/components/schemas/IssuePriority" }, "title": { "type": "string" } } }, "CreateIssueMemberCmd": { "type": "object", "required": [ "user_id", "kind" ], "properties": { "kind": { "$ref": "#/components/schemas/IssueMemberKind" }, "user_id": { "type": "integer", "format": "int64" } } }, "CreateJoinRequestCmd": { "type": "object", "properties": { "note": { "type": [ "string", "null" ] } } }, "CreateJoinRuleCmd": { "type": "object", "required": [ "role_id" ], "properties": { "matcher": { "type": "string" }, "role_id": { "type": "string", "format": "uuid" }, "trigger": { "$ref": "#/components/schemas/SpaceJoinTrigger" } } }, "CreateLabelCmd": { "type": "object", "required": [ "name", "color" ], "properties": { "color": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "exclusive": { "type": [ "boolean", "null" ] }, "exclusive_order": { "type": [ "integer", "null" ], "format": "int32" }, "name": { "type": "string" } } }, "CreateMilestoneCmd": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" } } }, "CreateOrganizationBody": { "type": "object", "required": [ "slug", "name" ], "properties": { "allow_invite": { "type": [ "boolean", "null" ] }, "allow_join": { "type": [ "boolean", "null" ] }, "allow_join_level": { "type": [ "integer", "null" ], "format": "int32" }, "avatar_url": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "join_policy": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceJoinPolicy" } ] }, "member_must_enable_2fa": { "type": [ "boolean", "null" ] }, "name": { "type": "string" }, "require_email_verified": { "type": [ "boolean", "null" ] }, "require_mfa": { "type": [ "boolean", "null" ] }, "slug": { "type": "string" }, "welcome_message": { "type": [ "string", "null" ] } } }, "CreateOutboundWebhookCmd": { "type": "object", "required": [ "name", "url" ], "properties": { "name": { "type": "string" }, "url": { "type": "string" } } }, "CreatePinCmd": { "type": "object", "required": [ "issue_id", "pin_order" ], "properties": { "issue_id": { "type": "string", "format": "uuid" }, "pin_order": { "type": "integer", "format": "int32" } } }, "CreatePullCmd": { "type": "object", "required": [ "title", "head_branch" ], "properties": { "base_branch": { "type": [ "string", "null" ] }, "body": { "type": [ "string", "null" ] }, "draft": { "type": [ "boolean", "null" ] }, "head_branch": { "type": "string" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "title": { "type": "string" } } }, "CreatePullCommentCmd": { "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ] }, "line": { "type": [ "integer", "null" ], "format": "int32" }, "parent_comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": [ "string", "null" ], "description": "行内评论需要 path;缺省则为普通讨论评论。" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "side": { "type": [ "string", "null" ], "description": "left | right" } } }, "CreateReactionCmd": { "type": "object", "required": [ "emoji" ], "properties": { "emoji": { "type": "string" } } }, "CreateReleaseCmd": { "type": "object", "required": [ "tag_name" ], "properties": { "content": { "type": [ "string", "null" ] }, "is_draft": { "type": [ "boolean", "null" ] }, "is_prerelease": { "type": [ "boolean", "null" ] }, "tag_name": { "type": "string" }, "target": { "type": [ "string", "null" ] }, "title": { "type": [ "string", "null" ] } } }, "CreateReminderCmd": { "type": "object", "required": [ "remind_at" ], "properties": { "note": { "type": [ "string", "null" ] }, "remind_at": { "type": "string", "format": "date-time" } } }, "CreateRepoCmd": { "type": "object", "required": [ "name" ], "properties": { "default_branch": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "enable_lfs": { "type": "boolean" }, "init_message": { "type": [ "string", "null" ] }, "is_private": { "type": "boolean" }, "license_name": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "CreateRepoRelCmd": { "type": "object", "required": [ "repo_id" ], "properties": { "repo_id": { "type": "string", "format": "uuid" } } }, "CreateReportCmd": { "type": "object", "required": [ "reported_id", "reason" ], "properties": { "evidence": { "type": [ "string", "null" ] }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" } } }, "CreateRoleBody": { "type": "object", "required": [ "key", "name" ], "properties": { "default_role": { "type": "boolean" }, "description": { "type": [ "string", "null" ] }, "key": { "type": "string" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionGrant" } }, "rank": { "type": "integer", "format": "int32" }, "self_assignable": { "type": "boolean" } } }, "CreateRoomCmd": { "type": "object", "required": [ "name" ], "properties": { "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "topic": { "type": [ "string", "null" ] }, "user_limit": { "type": [ "integer", "null" ], "format": "int32" } } }, "CreateTagCmd": { "type": "object", "required": [ "name", "target" ], "properties": { "annotated": { "type": "boolean" }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "target": { "type": "string" } } }, "CreateTagPolicyCmd": { "type": "object", "required": [ "name_pattern" ], "properties": { "name_pattern": { "type": "string" } } }, "CreateThreadCmd": { "type": "object", "properties": { "name": { "type": [ "string", "null" ] } } }, "CreateTopicCmd": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "CreateTrackedTimeCmd": { "type": "object", "required": [ "seconds" ], "properties": { "seconds": { "type": "integer", "format": "int64" } } }, "CreateWebhookCmd": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "DeleteOrgQuery": { "type": "object", "properties": { "force": { "type": "boolean" }, "reason": { "type": [ "string", "null" ] } } }, "DependencyDto": { "type": "object", "required": [ "id", "issue_id", "dependency_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dependency_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" } } }, "DependencyPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "dep_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "dep_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "DeviceDto": { "type": "object", "required": [ "id", "is_trusted", "first_seen_at", "last_seen_at" ], "properties": { "device_name": { "type": [ "string", "null" ] }, "device_type": { "type": [ "string", "null" ] }, "first_seen_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_trusted": { "type": "boolean" }, "last_seen_at": { "type": "string", "format": "date-time" }, "os": { "type": [ "string", "null" ] } } }, "DiffTreeRecordDto": { "type": "object", "required": [ "status", "score" ], "properties": { "base_blob_id": { "type": [ "string", "null" ] }, "base_mode": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "base_path": { "type": [ "string", "null" ] }, "head_blob_id": { "type": [ "string", "null" ] }, "head_mode": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "head_path": { "type": [ "string", "null" ] }, "score": { "type": "integer", "format": "int32", "minimum": 0 }, "status": { "type": "string" } } }, "DiffView": { "type": "string", "enum": [ "shortstat", "numstat", "files", "tree" ] }, "DirKind": { "type": "string", "enum": [ "Dir", "Object", "IssueBoard", "GitRepo", "ChatChannel", "VoiceChannel" ] }, "DirNodeDto": { "type": "object", "required": [ "id", "name", "kind", "position", "is_archived", "created_at", "updated_at", "created_by_id", "children" ], "properties": { "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/DirNodeDto" } }, "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/DirKind" }, "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "purpose": { "type": [ "string", "null" ] }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } }, "DmDto": { "type": "object", "required": [ "id", "kind", "name", "last_read_seq", "tip_seq", "unread_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "name": { "type": "string" }, "peer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" } } }, "DraftDto": { "type": "object", "required": [ "room_id", "content", "updated_at" ], "properties": { "content": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "DraftQuery": { "type": "object", "properties": { "thread_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "EmbedAuthor": { "type": "object", "properties": { "icon_url": { "type": [ "string", "null" ], "default": null }, "name": { "type": "string", "default": "" }, "proxy_icon_url": { "type": [ "string", "null" ], "default": null }, "url": { "type": [ "string", "null" ], "default": null } } }, "EmbedField": { "type": "object", "properties": { "inline": { "type": "boolean", "default": false }, "name": { "type": "string", "default": "" }, "value": { "type": "string", "default": "" } } }, "EmbedFooter": { "type": "object", "properties": { "icon_url": { "type": [ "string", "null" ], "default": null }, "proxy_icon_url": { "type": [ "string", "null" ], "default": null }, "text": { "type": "string", "default": "" } } }, "EmbedMedia": { "type": "object", "properties": { "content_hash": { "type": [ "string", "null" ], "default": null }, "content_type": { "type": [ "string", "null" ], "default": null }, "description": { "type": [ "string", "null" ], "default": null }, "duration": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "flags": { "type": "integer", "format": "int32", "default": 0, "minimum": 0 }, "height": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "placeholder": { "type": [ "string", "null" ], "default": null }, "proxy_url": { "type": [ "string", "null" ], "default": null }, "url": { "type": [ "string", "null" ], "default": null }, "width": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 } } }, "EmbedProvider": { "type": "object", "properties": { "name": { "type": "string", "default": "" }, "url": { "type": [ "string", "null" ], "default": null } } }, "EmojiDto": { "type": "object", "required": [ "id", "space_id", "name", "animated", "disabled", "created_at" ], "properties": { "animated": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "space_id": { "type": "string", "format": "uuid" } } }, "Envelope_AcceptAgreementResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "recorded" ], "properties": { "recorded": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_AccountDeletionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "status", "requested_at", "purge_after" ], "properties": { "last_error": { "type": [ "string", "null" ] }, "purge_after": { "type": "string", "format": "date-time" }, "requested_at": { "type": "string", "format": "date-time" }, "status": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ArchiveResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "format", "size", "cache_key" ], "properties": { "cache_key": { "type": "string" }, "download_url": { "type": [ "string", "null" ] }, "format": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_AttachmentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "user_id", "filename", "content_type", "size", "status", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "duration_secs": { "type": [ "integer", "null" ], "format": "int32" }, "filename": { "type": "string" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": [ "string", "null" ], "format": "uuid" }, "size": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/AttachmentStatus" }, "user_id": { "type": "integer", "format": "int64" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_AvatarDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "description": "Size of the uploaded original in bytes.", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat", "description": "Format of the uploaded original." }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string", "description": "Browser-facing URL. Points at the compressed derivative when one exists,\nand at the uploaded bytes otherwise." }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BlobContentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "oid", "data", "size", "is_binary", "truncated" ], "properties": { "data": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } }, "is_binary": { "type": "boolean" }, "oid": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "truncated": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BlobMetaDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "oid", "size", "is_binary", "is_lfs_pointer" ], "properties": { "is_binary": { "type": "boolean" }, "is_lfs_pointer": { "type": "boolean" }, "lfs": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/LfsPointerDto" } ] }, "oid": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BoardDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "dir_id", "name", "open_issues_count", "closed_issues_count", "created_at" ], "properties": { "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "open_issues_count": { "type": "integer", "format": "int64" }, "prefix": { "type": [ "string", "null" ], "description": "Number prefix for the board's issues (`CAD` renders as `CAD-12`)." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BookmarkDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "title", "position", "created_by_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "emoji": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "url": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BranchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "name", "commit_sha", "is_protected", "is_deleted", "created_at", "updated_at" ], "properties": { "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_deleted": { "type": "boolean" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BranchPolicyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "repo_id", "branch_pattern", "enable_push", "enable_push_whitelist", "push_whitelist_deploy_keys", "enable_merge_whitelist", "required_approvals", "enable_approvals_whitelist", "block_on_rejected_reviews", "block_on_change_requested_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "unprotected_file_patterns", "enable_force_push", "required_status_contexts", "created_at", "updated_at" ], "properties": { "block_on_change_requested_reviews": { "type": "boolean" }, "block_on_outdated_branch": { "type": "boolean" }, "block_on_rejected_reviews": { "type": "boolean" }, "branch_pattern": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "dismiss_stale_approvals": { "type": "boolean" }, "enable_approvals_whitelist": { "type": "boolean" }, "enable_force_push": { "type": "boolean" }, "enable_merge_whitelist": { "type": "boolean" }, "enable_push": { "type": "boolean" }, "enable_push_whitelist": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "protected_file_patterns": { "type": "string" }, "push_whitelist_deploy_keys": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "require_signed_commits": { "type": "boolean" }, "required_approvals": { "type": "integer", "format": "int32" }, "required_status_contexts": { "type": "string" }, "unprotected_file_patterns": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BranchWhitelistDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "policy_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "group_id": { "type": [ "string", "null" ], "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/WhitelistKind" }, "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_BulkResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "updated" ], "properties": { "updated": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ChallengeResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "context", "difficulty", "issued_at", "expires_at" ], "properties": { "context": { "type": "string" }, "difficulty": { "type": "integer", "format": "int32", "minimum": 0 }, "expires_at": { "type": "integer", "format": "int64", "minimum": 0 }, "issued_at": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CodeActivityDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "authors", "total_commits", "total_additions", "total_deletions" ], "properties": { "authors": { "type": "array", "items": { "$ref": "#/components/schemas/CodeActivityAuthorDto" } }, "total_additions": { "type": "integer", "format": "int64" }, "total_commits": { "type": "integer", "format": "int64" }, "total_deletions": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CodeCommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "repo_id", "path", "line", "commit_sha", "body", "resolved", "outdated", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": "integer", "format": "int32" }, "outdated": { "type": "boolean", "description": "该评论锚定的提交是否仍是当前分支提示(否则视为 outdated)。" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "poster": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CommitStatusDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "state", "context", "creator_id", "created_at" ], "properties": { "context": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "creator_id": { "type": "integer", "format": "int64" }, "description": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/CommitStatusDtoState" }, "target_url": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ConflictDetailDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "path" ], "properties": { "content": { "type": [ "string", "null" ] }, "path": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CountResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "count" ], "properties": { "count": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_CreateInviteResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "invite", "token" ], "properties": { "invite": { "$ref": "#/components/schemas/InviteSummary" }, "token": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_DependencyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "issue_id", "dependency_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dependency_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_DirNodeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "name", "kind", "position", "is_archived", "created_at", "updated_at", "created_by_id", "children" ], "properties": { "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/DirNodeDto" } }, "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/DirKind" }, "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "purpose": { "type": [ "string", "null" ] }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_DmDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "kind", "name", "last_read_seq", "tip_seq", "unread_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "name": { "type": "string" }, "peer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_DraftDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "content", "updated_at" ], "properties": { "content": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_EmojiDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "space_id", "name", "animated", "disabled", "created_at" ], "properties": { "animated": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "space_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_FetchResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "updated", "new" ], "properties": { "new": { "type": "array", "items": { "type": "string" } }, "updated": { "type": "array", "items": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_GroupDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "space_id", "name", "position", "color", "version", "created_at", "permissions" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "created_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer", "format": "int64" }, "space_id": { "type": "string", "format": "uuid" }, "unicode_emoji": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_GroupOverwriteDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "dir_id", "group_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "group_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_HandDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "display_name", "state", "requested_at" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "requested_at": { "type": "integer", "format": "int64" }, "state": { "$ref": "#/components/schemas/HandState" }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ImportResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "default_branch", "commit_count" ], "properties": { "commit_count": { "type": "integer", "format": "int64" }, "default_branch": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IsAncestorResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "is_ancestor" ], "properties": { "is_ancestor": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IssueAttachmentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "uploader_id", "filename", "content_type", "size", "status", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "filename": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid", "description": "`None` until the draft is submitted with this attachment attached." }, "size": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/IssueAttachmentStatus" }, "uploader_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IssueDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "board_id", "number", "title", "content", "priority", "assignees", "state", "created_at" ], "properties": { "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "board_id": { "type": "string", "format": "uuid" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "number": { "type": "integer", "format": "int32" }, "priority": { "$ref": "#/components/schemas/IssuePriority" }, "state": { "$ref": "#/components/schemas/IssueState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "viewer_watch": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/WatchMode" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IssueMemberDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "issue_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/IssueMemberKind" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IssueUploadIntentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "upload_url", "expires_secs" ], "properties": { "expires_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "id": { "type": "string", "format": "uuid" }, "upload_url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_IssueUserDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "user_id", "issue_id", "is_read", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_read": { "type": "boolean" }, "issue_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_JoinRequestDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "space_id", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "decided_at": { "type": [ "string", "null" ], "format": "date-time" }, "decided_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "id": { "type": "string", "format": "uuid" }, "note": { "type": [ "string", "null" ] }, "space_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/SpaceJoinRequestState" }, "updated_at": { "type": "string", "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_JoinRuleDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "role_id", "trigger", "matcher", "enabled", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "enabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "matcher": { "type": "string" }, "role_id": { "type": "string", "format": "uuid" }, "trigger": { "$ref": "#/components/schemas/SpaceJoinTrigger" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LabelDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "dir_id", "name", "exclusive", "exclusive_order", "color", "is_archived", "created_at" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "exclusive": { "type": "boolean" }, "exclusive_order": { "type": "integer", "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LfsLock": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "path", "locked_at", "owner" ], "properties": { "id": { "type": "string" }, "locked_at": { "type": "string" }, "owner": { "$ref": "#/components/schemas/LfsLockOwner" }, "path": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LfsLockListResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "properties": { "locks": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } }, "next_cursor": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LfsVerifyLocksResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "properties": { "next_cursor": { "type": [ "string", "null" ] }, "ours": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } }, "theirs": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LicenseDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "name", "display_name", "body", "created_at", "updated_at" ], "properties": { "body": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LoginCodeResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_LogoutResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "properties": { "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MarkedCountResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "marked" ], "properties": { "marked": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MeResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user" ], "properties": { "profile": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProfileDto" } ] }, "user": { "$ref": "#/components/schemas/UserMeDto" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MeResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "username", "email", "is_admin", "created_at", "version" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "email_verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_admin": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MemberDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "space_id", "status", "joined_at", "created_at", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "hide_muted_channels": { "type": "boolean" }, "invited_at": { "type": [ "string", "null" ], "format": "date-time" }, "invited_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/MemberStatus" }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MemberSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "organization_id", "user_id", "username", "role", "role_keys", "permissions", "joined_at", "join_method", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels", "ban_allow_agent_join", "ban_allow_speak", "ban_allow_push_repo", "ban_allow_comment_any", "version" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "ban_allow_agent_join": { "type": "boolean" }, "ban_allow_comment_any": { "type": "boolean" }, "ban_allow_push_repo": { "type": "boolean" }, "ban_allow_speak": { "type": "boolean" }, "ban_expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "ban_reason": { "type": [ "string", "null" ] }, "banned_at": { "type": [ "string", "null" ], "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "hide_muted_channels": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "invited_by": { "type": [ "integer", "null" ], "format": "int64" }, "join_method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "type": "string" } }, "role": { "$ref": "#/components/schemas/SpaceMemberRole" }, "role_keys": { "type": "array", "items": { "type": "string" } }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MemeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "name", "content_type", "url", "size", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MergePullDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "pull", "result", "summary" ], "properties": { "pull": { "$ref": "#/components/schemas/PullDto" }, "result": { "$ref": "#/components/schemas/MergeResultDto" }, "summary": { "$ref": "#/components/schemas/PullSummaryDto" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MergeStatusDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "mergeable", "conflicts", "fast_forwardable" ], "properties": { "conflicts": { "type": "array", "items": { "type": "string" } }, "fast_forwardable": { "type": "boolean" }, "mergeable": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MessageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "thread_broadcast", "message_type", "content", "mentions", "mention_everyone", "attachments", "has_thread", "pinned", "seq", "created_at" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "author_id": { "type": "integer", "format": "int64" }, "author_type": { "$ref": "#/components/schemas/AuthorType" }, "content": { "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" }, "embeds": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEmbed" } }, "forwarded_from_id": { "type": [ "string", "null" ], "format": "uuid" }, "has_thread": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "mention_everyone": { "type": "boolean" }, "mentions": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "message_type": { "$ref": "#/components/schemas/ChatMessageType" }, "pinned": { "type": "boolean" }, "pinned_at": { "type": [ "string", "null" ], "format": "date-time" }, "pinned_by_id": { "type": [ "integer", "null" ], "format": "int64" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionAggDto" } }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "seq": { "type": "integer", "format": "int64" }, "thread_broadcast": { "type": "boolean" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "webhook_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_MilestoneDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "board_id", "name", "is_closed", "issues_count", "closed_issues_count", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_closed": { "type": "boolean" }, "issues_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_NoData": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "default": null }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Option_AvatarDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "user_id", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "description": "Size of the uploaded original in bytes.", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat", "description": "Format of the uploaded original." }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string", "description": "Browser-facing URL. Points at the compressed derivative when one exists,\nand at the uploaded bytes otherwise." }, "user_id": { "type": "integer", "format": "int64" } } } ] }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Option_DraftDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "room_id", "content", "updated_at" ], "properties": { "content": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } ] }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Option_SpaceImageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "space_id", "kind", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "kind": { "$ref": "#/components/schemas/SpaceImageKind" }, "space_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } } ] }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Option_StopwatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "running", "issue_id" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": [ "string", "null" ], "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "running": { "type": "boolean" }, "started_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } ] }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_OrganizationSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "slug", "name", "status", "owner_user_id", "member_count", "version", "created_at", "updated_at", "join_policy", "allow_join", "require_email_verified", "require_mfa", "member_must_enable_2fa", "allow_invite", "allow_join_level" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "type": "integer", "format": "int32" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "join_policy": { "$ref": "#/components/schemas/SpaceJoinPolicy" }, "member_count": { "type": "integer", "format": "int64" }, "member_must_enable_2fa": { "type": "boolean" }, "my_role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceMemberRole" } ] }, "name": { "type": "string" }, "owner_user_id": { "type": "integer", "format": "int64" }, "require_email_verified": { "type": "boolean" }, "require_mfa": { "type": "boolean" }, "slug": { "type": "string" }, "status": { "$ref": "#/components/schemas/SpaceStatus" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" }, "welcome_message": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_OutboundWebhookDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "name", "url", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_status": { "type": [ "string", "null" ] }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_OutboundWebhookSecretDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "name", "url", "secret", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "secret": { "type": "string" }, "url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_BoardDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "dir_id", "name", "open_issues_count", "closed_issues_count", "created_at" ], "properties": { "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "open_issues_count": { "type": "integer", "format": "int64" }, "prefix": { "type": [ "string", "null" ], "description": "Number prefix for the board's issues (`CAD` renders as `CAD-12`)." }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_BookmarkDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "title", "position", "created_by_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "emoji": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "url": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_BranchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "commit_sha", "is_protected", "is_deleted", "created_at", "updated_at" ], "properties": { "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_deleted": { "type": "boolean" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_CodeCommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "path", "line", "commit_sha", "body", "resolved", "outdated", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": "integer", "format": "int32" }, "outdated": { "type": "boolean", "description": "该评论锚定的提交是否仍是当前分支提示(否则视为 outdated)。" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_CommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "poster": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_CommitDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "tree_id", "parents", "author_name", "author_email", "author_time", "committer_name", "committer_email", "committer_time", "message" ], "properties": { "author_email": { "type": "string" }, "author_name": { "type": "string" }, "author_time": { "type": "integer", "format": "int64" }, "committer_email": { "type": "string" }, "committer_name": { "type": "string" }, "committer_time": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "tree_id": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_ContentHistoryDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "issue_id", "edited_at", "created_at" ], "properties": { "comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "content_after": { "type": [ "string", "null" ] }, "content_before": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "edited_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "poster": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_DeviceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "is_trusted", "first_seen_at", "last_seen_at" ], "properties": { "device_name": { "type": [ "string", "null" ] }, "device_type": { "type": [ "string", "null" ] }, "first_seen_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_trusted": { "type": "boolean" }, "last_seen_at": { "type": "string", "format": "date-time" }, "os": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_DmDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "name", "last_read_seq", "tip_seq", "unread_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "name": { "type": "string" }, "peer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_DraftDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "room_id", "content", "updated_at" ], "properties": { "content": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_EmojiDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "space_id", "name", "animated", "disabled", "created_at" ], "properties": { "animated": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "space_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_EventDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "event_type", "created_at" ], "properties": { "comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "commit_sha": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "event_type": { "$ref": "#/components/schemas/IssueEventType" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "new_ref": { "type": [ "string", "null" ] }, "new_title": { "type": [ "string", "null" ] }, "old_ref": { "type": [ "string", "null" ] }, "old_title": { "type": [ "string", "null" ] }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_ExploreSpaceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "lower_name", "name", "members_count", "allow_join", "allow_join_level", "created_at" ], "properties": { "allow_join": { "type": "boolean" }, "allow_join_level": { "$ref": "#/components/schemas/AllowJoinLevel" }, "avatar_url": { "type": [ "string", "null" ] }, "banner_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "lower_name": { "type": "string" }, "members_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "viewer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExploreViewerDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_GroupDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "space_id", "name", "position", "color", "version", "created_at", "permissions" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "created_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer", "format": "int64" }, "space_id": { "type": "string", "format": "uuid" }, "unicode_emoji": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_InviteSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "organization_id", "method", "created_by", "max_uses", "uses", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by": { "type": "integer", "format": "int64" }, "email": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "max_uses": { "type": "integer", "format": "int32" }, "method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "organization_id": { "type": "string", "format": "uuid" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "role_id": { "type": [ "string", "null" ], "format": "uuid" }, "target_user_id": { "type": [ "integer", "null" ], "format": "int64" }, "uses": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_IssueListItemDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "board_id", "number", "title", "labels", "priority", "assignees", "state", "created_at" ], "properties": { "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "board_id": { "type": "string", "format": "uuid" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/LabelDto" }, "description": "Chips the list rows render; the detail view fetches these separately." }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "number": { "type": "integer", "format": "int32" }, "priority": { "$ref": "#/components/schemas/IssuePriority" }, "state": { "$ref": "#/components/schemas/IssueState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_IssueMemberDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "issue_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/IssueMemberKind" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_IssueUserDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "user_id", "issue_id", "is_read", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_read": { "type": "boolean" }, "issue_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_JoinRequestDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "space_id", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "decided_at": { "type": [ "string", "null" ], "format": "date-time" }, "decided_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "id": { "type": "string", "format": "uuid" }, "note": { "type": [ "string", "null" ] }, "space_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/SpaceJoinRequestState" }, "updated_at": { "type": "string", "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_LabelDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "dir_id", "name", "exclusive", "exclusive_order", "color", "is_archived", "created_at" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "exclusive": { "type": "boolean" }, "exclusive_order": { "type": "integer", "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_LicenseDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "display_name", "body", "created_at", "updated_at" ], "properties": { "body": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_MemberSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "organization_id", "user_id", "username", "role", "role_keys", "permissions", "joined_at", "join_method", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels", "ban_allow_agent_join", "ban_allow_speak", "ban_allow_push_repo", "ban_allow_comment_any", "version" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "ban_allow_agent_join": { "type": "boolean" }, "ban_allow_comment_any": { "type": "boolean" }, "ban_allow_push_repo": { "type": "boolean" }, "ban_allow_speak": { "type": "boolean" }, "ban_expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "ban_reason": { "type": [ "string", "null" ] }, "banned_at": { "type": [ "string", "null" ], "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "hide_muted_channels": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "invited_by": { "type": [ "integer", "null" ], "format": "int64" }, "join_method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "type": "string" } }, "role": { "$ref": "#/components/schemas/SpaceMemberRole" }, "role_keys": { "type": "array", "items": { "type": "string" } }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_MessageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "thread_broadcast", "message_type", "content", "mentions", "mention_everyone", "attachments", "has_thread", "pinned", "seq", "created_at" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "author_id": { "type": "integer", "format": "int64" }, "author_type": { "$ref": "#/components/schemas/AuthorType" }, "content": { "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" }, "embeds": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEmbed" } }, "forwarded_from_id": { "type": [ "string", "null" ], "format": "uuid" }, "has_thread": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "mention_everyone": { "type": "boolean" }, "mentions": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "message_type": { "$ref": "#/components/schemas/ChatMessageType" }, "pinned": { "type": "boolean" }, "pinned_at": { "type": [ "string", "null" ], "format": "date-time" }, "pinned_by_id": { "type": [ "integer", "null" ], "format": "int64" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionAggDto" } }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "seq": { "type": "integer", "format": "int64" }, "thread_broadcast": { "type": "boolean" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "webhook_id": { "type": [ "string", "null" ], "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_MilestoneDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "board_id", "name", "is_closed", "issues_count", "closed_issues_count", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_closed": { "type": "boolean" }, "issues_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_MySpaceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "space", "permissions" ], "properties": { "permissions": { "type": "array", "items": { "type": "string" } }, "space": { "$ref": "#/components/schemas/SpaceDto" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_NotificationDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "notification_type", "title", "created_at" ], "properties": { "actor_id": { "type": [ "integer", "null" ], "format": "int64" }, "body": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Value" } ] }, "id": { "type": "string", "format": "uuid" }, "notification_type": { "$ref": "#/components/schemas/NotificationType" }, "read_at": { "type": [ "string", "null" ], "format": "date-time" }, "title": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_OrganizationSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slug", "name", "status", "owner_user_id", "member_count", "version", "created_at", "updated_at", "join_policy", "allow_join", "require_email_verified", "require_mfa", "member_must_enable_2fa", "allow_invite", "allow_join_level" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "type": "integer", "format": "int32" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "join_policy": { "$ref": "#/components/schemas/SpaceJoinPolicy" }, "member_count": { "type": "integer", "format": "int64" }, "member_must_enable_2fa": { "type": "boolean" }, "my_role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceMemberRole" } ] }, "name": { "type": "string" }, "owner_user_id": { "type": "integer", "format": "int64" }, "require_email_verified": { "type": "boolean" }, "require_mfa": { "type": "boolean" }, "slug": { "type": "string" }, "status": { "$ref": "#/components/schemas/SpaceStatus" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" }, "welcome_message": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_PullCommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "pull_request_id", "body", "resolved", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": [ "integer", "null" ], "format": "int32" }, "parent_comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": [ "string", "null" ] }, "pull_request_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "side": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_PullDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "number", "title", "body", "state", "is_draft", "auto_merge", "locked", "head", "base", "merge_method", "additions", "deletions", "files_changed", "created_at" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "auto_merge": { "type": "boolean" }, "base": { "$ref": "#/components/schemas/PullRefDto" }, "body": { "type": "string" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "commits_ahead": { "type": [ "integer", "null" ], "format": "int64" }, "commits_behind": { "type": [ "integer", "null" ], "format": "int64" }, "conflicts": { "type": [ "array", "null" ], "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head": { "$ref": "#/components/schemas/PullRefDto" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "merge_method": { "$ref": "#/components/schemas/MergeMethod" }, "mergeable": { "type": [ "boolean", "null" ] }, "mergeable_state": { "type": [ "string", "null" ] }, "merged_at": { "type": [ "string", "null" ], "format": "date-time" }, "merged_commit_sha": { "type": [ "string", "null" ] }, "merger": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "number": { "type": "integer", "format": "int32" }, "repo_id": { "type": "string", "format": "uuid" }, "squash_commit_sha": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/PullState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_PullEventDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "pull_request_id", "event_type", "created_at" ], "properties": { "actor": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "commit_sha": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "event_type": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "pull_request_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_PushSubscriptionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "endpoint", "platform", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "endpoint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "platform": { "$ref": "#/components/schemas/PushSubscriptionPlatform" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_ReleaseDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "tag_name", "target", "title", "sha", "num_commits", "is_draft", "is_prerelease", "publisher_name", "created_at", "updated_at" ], "properties": { "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "is_prerelease": { "type": "boolean" }, "num_commits": { "type": "integer", "format": "int32" }, "publisher": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "publisher_name": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "sha": { "type": "string" }, "tag_name": { "type": "string" }, "target": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_RepoSummaryDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "default_branch", "stars_count", "watchers_count", "is_private", "is_archived", "size", "updated_at" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "default_branch": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "is_private": { "type": "boolean" }, "license_name": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "primary_language": { "type": [ "string", "null" ] }, "size": { "type": "integer", "format": "int64" }, "stars_count": { "type": "integer", "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "watchers_count": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_SavedMessageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "channel_id", "message_id", "saved_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "saved_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_SessionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "last_seen_at", "created_at", "expires_at", "is_revoked", "is_current" ], "properties": { "client_ip_hash": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "device_id": { "type": [ "string", "null" ], "format": "uuid" }, "expires_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_current": { "type": "boolean" }, "is_revoked": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/SessionKind" }, "last_seen_at": { "type": "string", "format": "date-time" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent_hash": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_SshKeySummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "algorithm", "fingerprint", "public_key", "created_at" ], "properties": { "algorithm": { "$ref": "#/components/schemas/SshKeyAlgorithm" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "fingerprint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "public_key": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_StargazerDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "starred_at" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "starred_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_TagDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "tag_type", "target_sha" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "tag_type": { "$ref": "#/components/schemas/TagType" }, "tagger_email": { "type": [ "string", "null" ] }, "tagger_name": { "type": [ "string", "null" ] }, "target_sha": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_ThreadDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "root_message_id", "owner_id", "reply_count", "participant_count", "archived", "locked", "created_at", "updated_at" ], "properties": { "archived": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "last_reply_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_reply_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "name": { "type": [ "string", "null" ] }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "participant_count": { "type": "integer", "format": "int64" }, "reply_count": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "root_message_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_TopicDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_TopicRepoDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "repo_id", "repo_name", "space_name", "is_private" ], "properties": { "is_private": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "repo_name": { "type": "string" }, "space_name": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_TrackedTimeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "issue_id", "seconds", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "seconds": { "type": "integer", "format": "int64" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_UserReportDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "reported_id", "reason", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "evidence": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" }, "resolution_note": { "type": [ "string", "null" ] }, "status": { "$ref": "#/components/schemas/ReportStatus" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_WatcherDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "mode", "watching_since" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "watching_since": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Page_WebhookDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "name", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ParsedPatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "files", "additions", "deletions" ], "properties": { "additions": { "type": "integer", "format": "int64" }, "deletions": { "type": "integer", "format": "int64" }, "files": { "type": "array", "items": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PasswordResetConfirmResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PasswordResetResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "content", "size" ], "properties": { "content": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PermissionCheck": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "allowed", "reason", "matched_by", "organization_version" ], "properties": { "allowed": { "type": "boolean" }, "matched_by": { "type": "string" }, "organization_version": { "type": "integer", "format": "int32" }, "reason": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PinDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "board_id", "pin_order", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "pin_order": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PresenceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "status", "activities", "online" ], "properties": { "activities": {}, "last_seen_at": { "type": [ "string", "null" ], "format": "date-time" }, "online": { "type": "boolean" }, "status": { "$ref": "#/components/schemas/PresenceStatus" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ProfileDetailDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "updated_at" ], "properties": { "accent_color": { "type": [ "string", "null" ] }, "avatar_url": { "type": "string" }, "banner_url": { "type": [ "string", "null" ] }, "bio": { "type": [ "string", "null" ] }, "company": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "location": { "type": [ "string", "null" ] }, "pronouns": { "type": [ "string", "null" ] }, "real_name": { "type": [ "string", "null" ] }, "show_activity": { "type": [ "boolean", "null" ] }, "show_email": { "type": [ "boolean", "null" ] }, "show_location": { "type": [ "boolean", "null" ] }, "show_real_name": { "type": [ "boolean", "null" ] }, "updated_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "visibility": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProfileVisibility" } ] }, "website": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullChecksDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "head_sha", "statuses" ], "properties": { "head_sha": { "type": "string" }, "statuses": { "type": "array", "items": { "$ref": "#/components/schemas/CommitStatusDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullCommentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "pull_request_id", "body", "resolved", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": [ "integer", "null" ], "format": "int32" }, "parent_comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": [ "string", "null" ] }, "pull_request_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "side": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "repo_id", "number", "title", "body", "state", "is_draft", "auto_merge", "locked", "head", "base", "merge_method", "additions", "deletions", "files_changed", "created_at" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "auto_merge": { "type": "boolean" }, "base": { "$ref": "#/components/schemas/PullRefDto" }, "body": { "type": "string" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "commits_ahead": { "type": [ "integer", "null" ], "format": "int64" }, "commits_behind": { "type": [ "integer", "null" ], "format": "int64" }, "conflicts": { "type": [ "array", "null" ], "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head": { "$ref": "#/components/schemas/PullRefDto" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "merge_method": { "$ref": "#/components/schemas/MergeMethod" }, "mergeable": { "type": [ "boolean", "null" ] }, "mergeable_state": { "type": [ "string", "null" ] }, "merged_at": { "type": [ "string", "null" ], "format": "date-time" }, "merged_commit_sha": { "type": [ "string", "null" ] }, "merger": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "number": { "type": "integer", "format": "int32" }, "repo_id": { "type": "string", "format": "uuid" }, "squash_commit_sha": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/PullState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullGateDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "head_sha", "mergeable", "conflicts", "gate", "pending_review_requests" ], "properties": { "conflicts": { "type": "array", "items": { "type": "string" } }, "gate": { "$ref": "#/components/schemas/MergeGateDto" }, "head_sha": { "type": "string" }, "mergeable": { "type": "boolean" }, "pending_review_requests": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullReviewDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "pull_request_id", "state", "commit_sha", "official", "comment_count", "created_at" ], "properties": { "comment_count": { "type": "integer", "format": "int64", "minimum": 0 }, "commit_sha": { "type": "string" }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "official": { "type": "boolean" }, "pull_request_id": { "type": "string", "format": "uuid" }, "state": { "$ref": "#/components/schemas/ReviewState" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PullSummaryDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "head_sha", "base_sha", "mergeable", "mergeable_state", "conflicts", "commits_ahead", "commits_behind", "additions", "deletions", "files_changed" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "base_sha": { "type": "string" }, "commits_ahead": { "type": "integer", "format": "int64" }, "commits_behind": { "type": "integer", "format": "int64" }, "conflicts": { "type": "array", "items": { "type": "string" } }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head_sha": { "type": "string" }, "merge_base": { "type": [ "string", "null" ] }, "mergeable": { "type": "boolean" }, "mergeable_state": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PushConfigDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "description": "前端注册 Service Worker 所需的公开参数。\n\n只有公钥是公开的(它就是浏览器 `applicationServerKey` 要的东西),私钥永远\n不出现在任何响应里。`enabled=false` 时前端把整个\"系统通知\"开关藏起来,\n而不是让用户点了才发现服务端没开。", "required": [ "enabled", "public_key" ], "properties": { "enabled": { "type": "boolean" }, "public_key": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PushResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "pushed", "rejected" ], "properties": { "pushed": { "type": "array", "items": { "type": "string" } }, "rejected": { "type": "array", "items": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_PushSubscriptionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "endpoint", "platform", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "endpoint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "platform": { "$ref": "#/components/schemas/PushSubscriptionPlatform" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ReactionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "scope", "target_id", "emoji", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "emoji": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "scope": { "$ref": "#/components/schemas/ReactionScope" }, "target_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ReadStateDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "last_read_seq", "tip_seq", "unread_count", "unread_mentions" ], "properties": { "last_read_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "last_viewed_at": { "type": [ "string", "null" ], "format": "date-time" }, "room_id": { "type": "string", "format": "uuid" }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RecoveryCodesResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "total", "used", "codes" ], "properties": { "codes": { "type": "array", "items": { "type": "string" } }, "total": { "type": "integer", "format": "int32", "minimum": 0 }, "used": { "type": "integer", "format": "int32", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RedeemInviteResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "organization_id", "member_id", "joined" ], "properties": { "joined": { "type": "boolean" }, "member_id": { "type": "string", "format": "uuid" }, "organization_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RegisterCodeResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ReleaseDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "repo_id", "tag_name", "target", "title", "sha", "num_commits", "is_draft", "is_prerelease", "publisher_name", "created_at", "updated_at" ], "properties": { "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "is_prerelease": { "type": "boolean" }, "num_commits": { "type": "integer", "format": "int32" }, "publisher": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "publisher_name": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "sha": { "type": "string" }, "tag_name": { "type": "string" }, "target": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ReminderDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "message_id", "remind_at", "status", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "message_preview": { "type": [ "string", "null" ] }, "note": { "type": [ "string", "null" ] }, "remind_at": { "type": "string", "format": "date-time" }, "room_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/ReminderStatus" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RepairDirResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "scanned", "fixed" ], "properties": { "fixed": { "type": "integer", "format": "int64" }, "scanned": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RepoDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "name", "default_branch", "watchers_count", "stars_count", "pulls_count", "commits_count", "branches_count", "tags_count", "enable_lfs", "is_private", "is_archived", "size", "git_size", "lfs_size", "object_format", "allow_pull_requests", "tab_order", "created_at", "updated_at" ], "properties": { "allow_pull_requests": { "type": "boolean", "description": "是否允许在本仓库创建合并请求(关闭后页签隐藏、接口拒绝)。" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "branches_count": { "type": "integer", "format": "int32" }, "commits_count": { "type": "integer", "format": "int32" }, "created_at": { "type": "string", "format": "date-time" }, "default_branch": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "enable_lfs": { "type": "boolean" }, "git_size": { "type": "integer", "format": "int64" }, "http_clone_url": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "is_private": { "type": "boolean" }, "last_pushed_at": { "type": [ "string", "null" ], "format": "date-time" }, "lfs_size": { "type": "integer", "format": "int64" }, "license_name": { "type": [ "string", "null" ] }, "me": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RepoMeDto" } ] }, "name": { "type": "string" }, "object_format": { "type": "string" }, "primary_language": { "type": [ "string", "null" ] }, "pulls_count": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int64" }, "ssh_clone_url": { "type": [ "string", "null" ] }, "stars_count": { "type": "integer", "format": "int32" }, "storage_limit_size": { "type": [ "integer", "null" ], "format": "int64" }, "tab_order": { "type": "array", "items": { "type": "string" }, "description": "中间页签顺序;空数组 = 默认顺序。" }, "tags_count": { "type": "integer", "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "watchers_count": { "type": "integer", "format": "int32" }, "website": { "type": [ "string", "null" ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RepoRelDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "issue_id", "repo_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "repo_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RepoStarResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "stars" ], "properties": { "stars": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RepoWatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "repo_id", "mode", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "repo_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ReportDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "reported_id", "reason", "status", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "evidence": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/ReportStatus" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RoleSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "organization_id", "key", "name", "rank", "system", "default_role", "self_assignable", "permissions", "member_count", "created_at", "updated_at", "version", "position" ], "properties": { "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "default_role": { "type": "boolean" }, "description": { "type": [ "string", "null" ] }, "emoji": { "type": [ "string", "null" ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "key": { "type": "string" }, "member_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionGrant" } }, "position": { "type": "integer", "format": "int64" }, "rank": { "type": "integer", "format": "int32" }, "self_assignable": { "type": "boolean" }, "system": { "type": "boolean" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RoomBriefDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "owner_id", "kind", "name", "position", "is_private", "nsfw", "unread_count", "unread_mentions", "favorite", "muted", "hidden", "member_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "member_count": { "type": "integer", "format": "int64" }, "muted": { "type": "boolean" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RoomDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "kind", "name", "position", "owner_id", "is_private", "nsfw", "is_active", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" }, "user_limit": { "type": [ "integer", "null" ], "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_RoomSettingDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "notification_level", "muted", "favorite", "hidden" ], "properties": { "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "notification_level": { "$ref": "#/components/schemas/RoomNotificationLevel" }, "room_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SavedMessageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "channel_id", "message_id", "saved_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "saved_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ScriptOutputDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "exit_code", "stdout", "stderr" ], "properties": { "exit_code": { "type": "integer", "format": "int32" }, "stderr": { "type": "string" }, "stdout": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SignatureDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "name", "email", "when" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "when": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SpaceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "lower_name", "name", "is_private", "is_active", "allow_join", "allow_invite", "members_count", "allow_join_level", "member_must_enable_2fa", "created_at", "updated_at" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "$ref": "#/components/schemas/AllowJoinLevel" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "lower_name": { "type": "string" }, "member_must_enable_2fa": { "type": "boolean" }, "members_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": "string", "format": "date-time" }, "welcome_message": { "type": [ "string", "null" ] }, "welcome_object": { "type": [ "string", "null" ], "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SpaceImageDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "space_id", "kind", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "kind": { "$ref": "#/components/schemas/SpaceImageKind" }, "space_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SpaceReadStates": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ReadStateDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_SshKeySummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "name", "algorithm", "fingerprint", "public_key", "created_at" ], "properties": { "algorithm": { "$ref": "#/components/schemas/SshKeyAlgorithm" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "fingerprint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "public_key": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_StopwatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "running", "issue_id" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": [ "string", "null" ], "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "running": { "type": "boolean" }, "started_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_String": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "string" }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TagDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "name", "tag_type", "target_sha" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "tag_type": { "$ref": "#/components/schemas/TagType" }, "tagger_email": { "type": [ "string", "null" ] }, "tagger_name": { "type": [ "string", "null" ] }, "target_sha": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TagPolicyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "repo_id", "name_pattern", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name_pattern": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TagWhitelistDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "policy_id", "user_id" ], "properties": { "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_ThreadDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "root_message_id", "owner_id", "reply_count", "participant_count", "archived", "locked", "created_at", "updated_at" ], "properties": { "archived": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "last_reply_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_reply_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "name": { "type": [ "string", "null" ] }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "participant_count": { "type": "integer", "format": "int64" }, "reply_count": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "root_message_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TopicDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TotpSetupResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "secret", "otpauth_uri" ], "properties": { "otpauth_uri": { "type": "string" }, "secret": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TotpStatusResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "enabled" ], "properties": { "enabled": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_TrackedTimeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "issue_id", "seconds", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "seconds": { "type": "integer", "format": "int64" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UnreadCountResp": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "count" ], "properties": { "count": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UpdateBranchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "pull", "result" ], "properties": { "pull": { "$ref": "#/components/schemas/PullDto" }, "result": { "$ref": "#/components/schemas/MergeResultDto" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UploadIntentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "upload_url", "expires_secs" ], "properties": { "expires_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "id": { "type": "string", "format": "uuid" }, "upload_url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UserLoginResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "username", "mfa_required" ], "properties": { "challenge": { "type": [ "string", "null" ] }, "displayname": { "type": [ "string", "null" ] }, "mfa_required": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UserOverwriteDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "dir_id", "user_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UserPreferencesDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "theme_mode", "board_view_mode", "in_app_flags", "email_flags", "push_flags", "email_digest", "allow_dms_from", "allow_mentions_from", "show_online_status" ], "properties": { "allow_dms_from": { "$ref": "#/components/schemas/Audience" }, "allow_mentions_from": { "$ref": "#/components/schemas/Audience" }, "board_view_mode": { "type": "string", "description": "Default view for the 问题集 page: `board` or `list`." }, "diff_view_style": { "type": [ "string", "null" ] }, "email_digest": { "type": "boolean" }, "email_flags": { "type": "integer", "format": "int32" }, "in_app_flags": { "type": "integer", "format": "int32" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "push_flags": { "type": "integer", "format": "int32" }, "show_online_status": { "type": "boolean" }, "theme_mode": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UserPublic": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_UserRegisterResponse": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "username" ], "properties": { "displayname": { "type": [ "string", "null" ] }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Value": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": {}, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_AgreementDoc": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "key", "version", "title", "content_md" ], "properties": { "content_md": { "type": "string" }, "key": { "type": "string" }, "title": { "type": "string" }, "version": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_BlameRangeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "starting_line", "ending_line", "commit_sha", "abbreviated_oid" ], "properties": { "abbreviated_oid": { "type": "string" }, "commit_sha": { "type": "string" }, "ending_line": { "type": "integer", "format": "int32" }, "path": { "type": [ "string", "null" ] }, "starting_line": { "type": "integer", "format": "int32" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_BranchPolicyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "branch_pattern", "enable_push", "enable_push_whitelist", "push_whitelist_deploy_keys", "enable_merge_whitelist", "required_approvals", "enable_approvals_whitelist", "block_on_rejected_reviews", "block_on_change_requested_reviews", "block_on_outdated_branch", "dismiss_stale_approvals", "require_signed_commits", "protected_file_patterns", "unprotected_file_patterns", "enable_force_push", "required_status_contexts", "created_at", "updated_at" ], "properties": { "block_on_change_requested_reviews": { "type": "boolean" }, "block_on_outdated_branch": { "type": "boolean" }, "block_on_rejected_reviews": { "type": "boolean" }, "branch_pattern": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "dismiss_stale_approvals": { "type": "boolean" }, "enable_approvals_whitelist": { "type": "boolean" }, "enable_force_push": { "type": "boolean" }, "enable_merge_whitelist": { "type": "boolean" }, "enable_push": { "type": "boolean" }, "enable_push_whitelist": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "protected_file_patterns": { "type": "string" }, "push_whitelist_deploy_keys": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "require_signed_commits": { "type": "boolean" }, "required_approvals": { "type": "integer", "format": "int32" }, "required_status_contexts": { "type": "string" }, "unprotected_file_patterns": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_BranchWhitelistDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "policy_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "group_id": { "type": [ "string", "null" ], "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/WhitelistKind" }, "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_ChangedPathDiffDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "path", "lines_added", "lines_removed", "binary" ], "properties": { "binary": { "type": "boolean" }, "lines_added": { "type": "integer", "format": "int64", "minimum": 0 }, "lines_removed": { "type": "integer", "format": "int64", "minimum": 0 }, "patch": { "type": [ "string", "null" ] }, "path": { "$ref": "#/components/schemas/ChangedPathDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_CleanupObjectDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "name", "path", "is_archived", "child_count", "overwrite_count" ], "properties": { "child_count": { "type": "integer", "format": "int64", "description": "目录的子节点数 / 频道的子频道数。" }, "id": { "type": "string", "format": "uuid", "description": "`dirs.id`(目录/仓库/问题集/智能体集)或 `rooms.id`(频道)。" }, "is_archived": { "type": "boolean" }, "is_private": { "type": [ "boolean", "null" ], "description": "仅仓库与频道有可见性开关。" }, "kind": { "type": "string", "description": "`dir | object | repo | board | text | voice | stage | category | news | guild_room`" }, "name": { "type": "string" }, "overwrite_count": { "type": "integer", "format": "int64", "description": "目录上的权限覆盖条数(group + user)。" }, "path": { "type": "string", "description": "父链拼出的可读路径,例如 `bots / 研究研究`。" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_CommentTreeNode": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "comment", "replies" ], "properties": { "comment": { "$ref": "#/components/schemas/CommentDto" }, "replies": { "type": "array", "items": { "$ref": "#/components/schemas/CommentTreeNode" } } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_CommitStatusDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "state", "context", "creator_id", "created_at" ], "properties": { "context": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "creator_id": { "type": "integer", "format": "int64" }, "description": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/CommitStatusDtoState" }, "target_url": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_ContributorStatDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "name", "email", "commits", "additions", "deletions" ], "properties": { "additions": { "type": "integer", "format": "int64" }, "commits": { "type": "integer", "format": "int64" }, "deletions": { "type": "integer", "format": "int64" }, "email": { "type": "string" }, "name": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_DependencyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "issue_id", "dependency_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dependency_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_DirNodeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "kind", "position", "is_archived", "created_at", "updated_at", "created_by_id", "children" ], "properties": { "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "children": { "type": "array", "items": { "$ref": "#/components/schemas/DirNodeDto" } }, "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "icon": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/DirKind" }, "name": { "type": "string" }, "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "purpose": { "type": [ "string", "null" ] }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_GroupOverwriteDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "dir_id", "group_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "group_id": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_IssueAttachmentDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "uploader_id", "filename", "content_type", "size", "status", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "filename": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid", "description": "`None` until the draft is submitted with this attachment attached." }, "size": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/IssueAttachmentStatus" }, "uploader_id": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_IssuePullLinkDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "relation_id", "linked_at", "pull" ], "properties": { "linked_at": { "type": "string", "format": "date-time", "description": "建立关联的时间。" }, "pull": { "$ref": "#/components/schemas/PullDto" }, "relation_id": { "type": "string", "format": "uuid", "description": "关联行主键(issue_relation_pull.id),解除关联时作为路径参数回传。" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_JoinRuleDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "role_id", "trigger", "matcher", "enabled", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "enabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "matcher": { "type": "string" }, "role_id": { "type": "string", "format": "uuid" }, "trigger": { "$ref": "#/components/schemas/SpaceJoinTrigger" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_LabelDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "dir_id", "name", "exclusive", "exclusive_order", "color", "is_archived", "created_at" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "exclusive": { "type": "boolean" }, "exclusive_order": { "type": "integer", "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_LanguageStatDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "language", "percentage_bp", "size", "is_primary" ], "properties": { "is_primary": { "type": "boolean" }, "language": { "type": "string" }, "percentage_bp": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_LfsPointerDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "version" ], "properties": { "oid": { "type": [ "string", "null" ] }, "size": { "type": [ "integer", "null" ], "format": "int64" }, "version": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_MemeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "content_type", "url", "size", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_MergeCommitDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "sha", "subject", "message", "author_name", "author_email", "author_at", "parents" ], "properties": { "author_at": { "type": "string", "format": "date-time" }, "author_email": { "type": "string" }, "author_name": { "type": "string" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "sha": { "type": "string" }, "subject": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_MessageEditDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "message_id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "editor": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_OutboundWebhookDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "name", "url", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_status": { "type": [ "string", "null" ] }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "url": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PathLogEntryDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "path", "short_sha", "date", "author", "subject" ], "properties": { "author": { "type": "string" }, "date": { "type": "string" }, "path": { "type": "string" }, "short_sha": { "type": "string" }, "subject": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PinDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "board_id", "pin_order", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "pin_order": { "type": "integer", "format": "int32" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PresenceDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "user_id", "status", "activities", "online" ], "properties": { "activities": {}, "last_seen_at": { "type": [ "string", "null" ], "format": "date-time" }, "online": { "type": "boolean" }, "status": { "$ref": "#/components/schemas/PresenceStatus" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PullAssigneeDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PullCommentThreadDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "description": "线程视图:顶层评论 + 其下全部回复(无递归,便于文档生成)。", "required": [ "root", "replies" ], "properties": { "replies": { "type": "array", "items": { "$ref": "#/components/schemas/PullCommentDto" } }, "root": { "$ref": "#/components/schemas/PullCommentDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PullReviewDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "pull_request_id", "state", "commit_sha", "official", "comment_count", "created_at" ], "properties": { "comment_count": { "type": "integer", "format": "int64", "minimum": 0 }, "commit_sha": { "type": "string" }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "official": { "type": "boolean" }, "pull_request_id": { "type": "string", "format": "uuid" }, "state": { "$ref": "#/components/schemas/ReviewState" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_PullReviewerDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "state", "required", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "requested_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "required": { "type": "boolean" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "state": { "$ref": "#/components/schemas/ReviewerState" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_ReactionAggDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "emoji", "count", "me" ], "properties": { "count": { "type": "integer", "format": "int64" }, "emoji": { "type": "string" }, "me": { "type": "boolean" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_ReactionUserDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "emoji", "user", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "emoji": { "type": "string" }, "user": { "$ref": "#/components/schemas/UserDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_RecentMentionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "channel_id", "message_id", "created_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_ReminderDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "message_id", "remind_at", "status", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "message_preview": { "type": [ "string", "null" ] }, "note": { "type": [ "string", "null" ] }, "remind_at": { "type": "string", "format": "date-time" }, "room_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/ReminderStatus" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_RemoteDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "name" ], "properties": { "fetch_url": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "push_url": { "type": [ "string", "null" ] } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_RepoRelDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "issue_id", "repo_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "repo_id": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_RoleSummary": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "organization_id", "key", "name", "rank", "system", "default_role", "self_assignable", "permissions", "member_count", "created_at", "updated_at", "version", "position" ], "properties": { "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "default_role": { "type": "boolean" }, "description": { "type": [ "string", "null" ] }, "emoji": { "type": [ "string", "null" ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "key": { "type": "string" }, "member_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionGrant" } }, "position": { "type": "integer", "format": "int64" }, "rank": { "type": "integer", "format": "int32" }, "self_assignable": { "type": "boolean" }, "system": { "type": "boolean" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_RoomBriefDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "owner_id", "kind", "name", "position", "is_private", "nsfw", "unread_count", "unread_mentions", "favorite", "muted", "hidden", "member_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "member_count": { "type": "integer", "format": "int64" }, "muted": { "type": "boolean" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_String": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "string" } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_SubmoduleDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "path", "url" ], "properties": { "branch": { "type": [ "string", "null" ] }, "commit_sha": { "type": [ "string", "null" ] }, "path": { "type": "string" }, "url": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_SuspensionDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "suspension_type", "starts_at", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": [ "string", "null" ] }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "starts_at": { "type": "string", "format": "date-time" }, "suspension_type": { "$ref": "#/components/schemas/SuspensionType" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_TagPolicyDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "name_pattern", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name_pattern": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_TagWhitelistDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "policy_id", "user_id" ], "properties": { "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_TopicDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_UserOverwriteDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "dir_id", "user_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_UserPublic": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_Vec_VoiceParticipantDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "description": "房间参与者快照。\n\n权威来源是 LiveKit 的 list_participants,Redis 只补主持人静音等本地状态;\n这是「谁在这个频道里」的服务端视图,用于侧栏人数与未加入时的预览。\n会中界面的发言高亮、静音图标与画面轨道一律直接读浏览器里的 Room,\n因为本接口不是事件流,返回值天然是快照。", "required": [ "user_id", "display_name", "joined_at", "can_publish", "moderator_muted", "speaking", "tracks" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "can_publish": { "type": "boolean" }, "display_name": { "type": "string" }, "joined_at": { "type": "integer", "format": "int64" }, "moderator_muted": { "type": "boolean" }, "speaking": { "type": "boolean", "description": "快照值:list_participants 不返回发言状态,因此这里恒为 false;\n实时发言指示由前端从 Room 的 activeSpeakers 读取。" }, "tracks": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceTrackDto" } }, "user_id": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VerifyResultDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "signed", "valid" ], "properties": { "error_message": { "type": [ "string", "null" ] }, "key_id": { "type": [ "string", "null" ] }, "signed": { "type": "boolean" }, "signer": { "type": [ "string", "null" ] }, "valid": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceConfigDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "enabled", "url", "recording_enabled" ], "properties": { "enabled": { "type": "boolean" }, "recording_enabled": { "type": "boolean" }, "url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceHandsDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "hands", "can_moderate" ], "properties": { "can_moderate": { "type": "boolean" }, "hands": { "type": "array", "items": { "$ref": "#/components/schemas/HandDto" } }, "my_state": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/HandState" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceLayoutDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "properties": { "tiles": { "type": "object", "description": "key 为参与者用户 id。", "additionalProperties": { "$ref": "#/components/schemas/VoiceTileDto" }, "propertyNames": { "type": "string" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceLayoutSavedDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "description": "本次写入的服务端时刻,客户端用它给本地副本盖戳。", "required": [ "updated_at" ], "properties": { "updated_at": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceModerationDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "ok", "action", "user_id" ], "properties": { "action": { "type": "string" }, "ok": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceRecordingDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "egress_id", "active" ], "properties": { "active": { "type": "boolean" }, "egress_id": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceSpaceStatesDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "rooms" ], "properties": { "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceRoomStateDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_VoiceTokenDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "token", "url", "room_name", "expires_in_secs", "can_publish", "is_stage" ], "properties": { "can_publish": { "type": "boolean" }, "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "hand_state": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/HandState" } ] }, "is_stage": { "type": "boolean" }, "room_name": { "type": "string" }, "token": { "type": "string" }, "url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_WatchDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "mode", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_WebhookDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "name", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_WebhookSecretDto": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "room_id", "name", "token", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "Envelope_bool": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "boolean" }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "EventDto": { "type": "object", "required": [ "id", "event_type", "created_at" ], "properties": { "comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "commit_sha": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "event_type": { "$ref": "#/components/schemas/IssueEventType" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "new_ref": { "type": [ "string", "null" ] }, "new_title": { "type": [ "string", "null" ] }, "old_ref": { "type": [ "string", "null" ] }, "old_title": { "type": [ "string", "null" ] }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "EventPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "ExploreSort": { "type": "string", "enum": [ "members", "newest" ] }, "ExploreSpaceDto": { "type": "object", "required": [ "id", "lower_name", "name", "members_count", "allow_join", "allow_join_level", "created_at" ], "properties": { "allow_join": { "type": "boolean" }, "allow_join_level": { "$ref": "#/components/schemas/AllowJoinLevel" }, "avatar_url": { "type": [ "string", "null" ] }, "banner_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "lower_name": { "type": "string" }, "members_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "viewer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExploreViewerDto" } ] } } }, "ExploreViewerDto": { "type": "object", "required": [ "is_member" ], "properties": { "is_member": { "type": "boolean" }, "request": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExploreViewerRequestDto" } ] } } }, "ExploreViewerRequestDto": { "type": "object", "required": [ "id", "status", "created_at" ], "properties": { "cooldown_until": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "decided_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/SpaceJoinRequestState" } } }, "FetchResultDto": { "type": "object", "required": [ "updated", "new" ], "properties": { "new": { "type": "array", "items": { "type": "string" } }, "updated": { "type": "array", "items": { "type": "string" } } } }, "FileEntryDto": { "type": "object", "required": [ "path", "content", "executable" ], "properties": { "content": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } }, "executable": { "type": "boolean" }, "path": { "type": "string" } } }, "FinalizeAttachmentCmd": { "type": "object", "properties": { "duration_secs": { "type": [ "integer", "null" ], "format": "int32" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "ForwardMessageCmd": { "type": "object", "required": [ "target_room_id" ], "properties": { "comment": { "type": [ "string", "null" ] }, "target_room_id": { "type": "string", "format": "uuid" } } }, "FsckDto": { "type": "object", "required": [ "ok", "dangling", "broken" ], "properties": { "broken": { "type": "integer", "format": "int64" }, "dangling": { "type": "integer", "format": "int64" }, "ok": { "type": "boolean" } } }, "GroupDto": { "type": "object", "required": [ "id", "space_id", "name", "position", "color", "version", "created_at", "permissions" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "created_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "permissions": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer", "format": "int64" }, "space_id": { "type": "string", "format": "uuid" }, "unicode_emoji": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } }, "GroupOverwriteDto": { "type": "object", "required": [ "dir_id", "group_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "group_id": { "type": "string", "format": "uuid" } } }, "HandDto": { "type": "object", "required": [ "user_id", "display_name", "state", "requested_at" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "requested_at": { "type": "integer", "format": "int64" }, "state": { "$ref": "#/components/schemas/HandState" }, "user_id": { "type": "integer", "format": "int64" } } }, "HandState": { "type": "string", "description": "举手状态。审批通过后 approved,被收回后 revoked(可再次举手)。", "enum": [ "pending", "approved", "denied", "revoked" ] }, "HeadInfoDto": { "type": "object", "required": [ "name", "object", "object_type", "is_detached" ], "properties": { "is_detached": { "type": "boolean" }, "name": { "type": "string" }, "object": { "type": "string" }, "object_type": { "type": "integer", "format": "int32" } } }, "HookEventKind": { "type": "string", "enum": [ "pre_receive", "post_receive", "update", "push", "tag", "merge_request" ] }, "HookExecBody": { "type": "object", "properties": { "args": { "type": "array", "items": { "type": "string" } } } }, "ImageVariant": { "type": "string", "description": "Which representation a read endpoint should hand back.", "enum": [ "preview", "original" ] }, "ImportResultDto": { "type": "object", "required": [ "default_branch", "commit_count" ], "properties": { "commit_count": { "type": "integer", "format": "int64" }, "default_branch": { "type": "string" } } }, "IncludeRevokedQuery": { "type": "object", "properties": { "active": { "type": [ "boolean", "null" ] }, "include_revoked": { "type": [ "boolean", "null" ] } } }, "IngestPackDto": { "type": "object", "required": [ "object_count", "size" ], "properties": { "object_count": { "type": "integer", "format": "int64" }, "size": { "type": "integer", "format": "int64" } } }, "InlineDraft": { "type": "object", "required": [ "path", "line" ], "properties": { "body": { "type": [ "string", "null" ] }, "line": { "type": "integer", "format": "int32" }, "path": { "type": "string" }, "side": { "type": [ "string", "null" ] } } }, "InviteListQuery": { "type": "object", "properties": { "include_revoked": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "InviteSummary": { "type": "object", "required": [ "id", "organization_id", "method", "created_by", "max_uses", "uses", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by": { "type": "integer", "format": "int64" }, "email": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "max_uses": { "type": "integer", "format": "int32" }, "method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "organization_id": { "type": "string", "format": "uuid" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "role_id": { "type": [ "string", "null" ], "format": "uuid" }, "target_user_id": { "type": [ "integer", "null" ], "format": "int64" }, "uses": { "type": "integer", "format": "int32" } } }, "IsAncestorResponse": { "type": "object", "required": [ "is_ancestor" ], "properties": { "is_ancestor": { "type": "boolean" } } }, "IsObjectInRefResponse": { "type": "object", "required": [ "contains" ], "properties": { "contains": { "type": "boolean" } } }, "IssueAttachmentDto": { "type": "object", "required": [ "id", "uploader_id", "filename", "content_type", "size", "status", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "filename": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid", "description": "`None` until the draft is submitted with this attachment attached." }, "size": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/IssueAttachmentStatus" }, "uploader_id": { "type": "integer", "format": "int64" } } }, "IssueAttachmentStatus": { "type": "string", "description": "Upload lifecycle: a row is created before the bytes exist (`Pending`) and\nonly an `Uploaded` row may be referenced by an issue.", "enum": [ "pending", "uploaded" ] }, "IssueDto": { "type": "object", "required": [ "id", "board_id", "number", "title", "content", "priority", "assignees", "state", "created_at" ], "properties": { "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "board_id": { "type": "string", "format": "uuid" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "number": { "type": "integer", "format": "int32" }, "priority": { "$ref": "#/components/schemas/IssuePriority" }, "state": { "$ref": "#/components/schemas/IssueState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "viewer_watch": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/WatchMode" } ] } } }, "IssueEventType": { "type": "string", "enum": [ "created", "title_updated", "description_updated", "content_updated", "milestone_updated", "priority_updated", "due_updated", "closed", "reopened", "comment_created", "comment_updated", "comment_deleted", "member_added", "member_removed", "label_added", "label_removed", "dependency_added", "dependency_removed", "pinned", "unpinned", "repo_relation_added", "repo_relation_removed", "pull_linked", "pull_unlinked" ] }, "IssueLabelPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "label_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "label_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "IssueListItemDto": { "type": "object", "required": [ "id", "board_id", "number", "title", "labels", "priority", "assignees", "state", "created_at" ], "properties": { "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "board_id": { "type": "string", "format": "uuid" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/LabelDto" }, "description": "Chips the list rows render; the detail view fetches these separately." }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "number": { "type": "integer", "format": "int32" }, "priority": { "$ref": "#/components/schemas/IssuePriority" }, "state": { "$ref": "#/components/schemas/IssueState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "IssueMemberDto": { "type": "object", "required": [ "id", "issue_id", "kind", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/IssueMemberKind" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "IssueMemberKind": { "type": "string", "enum": [ "assignee", "mentioned", "participant" ] }, "IssueMemberPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "member_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "member_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "IssuePath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "description": "issue uuid or board-scoped number (e.g. \"123\")" }, "space_name": { "type": "string" } } }, "IssuePriority": { "type": "string", "enum": [ "none", "low", "medium", "high", "urgent" ] }, "IssuePullLinkDto": { "type": "object", "required": [ "relation_id", "linked_at", "pull" ], "properties": { "linked_at": { "type": "string", "format": "date-time", "description": "建立关联的时间。" }, "pull": { "$ref": "#/components/schemas/PullDto" }, "relation_id": { "type": "string", "format": "uuid", "description": "关联行主键(issue_relation_pull.id),解除关联时作为路径参数回传。" } } }, "IssueSort": { "type": "string", "enum": [ "created_at", "updated_at", "due_at", "priority", "number" ] }, "IssueState": { "type": "string", "enum": [ "open", "closed" ] }, "IssueUploadIntentDto": { "type": "object", "required": [ "id", "upload_url", "expires_secs" ], "properties": { "expires_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "id": { "type": "string", "format": "uuid" }, "upload_url": { "type": "string" } } }, "IssueUserDto": { "type": "object", "required": [ "id", "user_id", "issue_id", "is_read", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_read": { "type": "boolean" }, "issue_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "IssueUserPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "user_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" }, "user_id": { "type": "integer", "format": "int64" } } }, "JoinRequestDto": { "type": "object", "required": [ "id", "space_id", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "decided_at": { "type": [ "string", "null" ], "format": "date-time" }, "decided_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "id": { "type": "string", "format": "uuid" }, "note": { "type": [ "string", "null" ] }, "space_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/SpaceJoinRequestState" }, "updated_at": { "type": "string", "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "JoinRuleDto": { "type": "object", "required": [ "id", "role_id", "trigger", "matcher", "enabled", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "enabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "matcher": { "type": "string" }, "role_id": { "type": "string", "format": "uuid" }, "trigger": { "$ref": "#/components/schemas/SpaceJoinTrigger" }, "updated_at": { "type": "string", "format": "date-time" } } }, "LabelDto": { "type": "object", "required": [ "id", "dir_id", "name", "exclusive", "exclusive_order", "color", "is_archived", "created_at" ], "properties": { "color": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "dir_id": { "type": "string", "format": "uuid" }, "exclusive": { "type": "boolean" }, "exclusive_order": { "type": "integer", "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "LabelPath": { "type": "object", "required": [ "space_name", "board_id", "label_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "label_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "LanguageStatDto": { "type": "object", "required": [ "language", "percentage_bp", "size", "is_primary" ], "properties": { "is_primary": { "type": "boolean" }, "language": { "type": "string" }, "percentage_bp": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int64" } } }, "LfsCleanupResponse": { "type": "object", "required": [ "removed" ], "properties": { "removed": { "type": "integer", "format": "int64" } } }, "LfsLock": { "type": "object", "required": [ "id", "path", "locked_at", "owner" ], "properties": { "id": { "type": "string" }, "locked_at": { "type": "string" }, "owner": { "$ref": "#/components/schemas/LfsLockOwner" }, "path": { "type": "string" } } }, "LfsLockBody": { "type": "object", "required": [ "path" ], "properties": { "oid": { "type": [ "string", "null" ] }, "path": { "type": "string" } } }, "LfsLockListResponse": { "type": "object", "properties": { "locks": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } }, "next_cursor": { "type": [ "string", "null" ] } } }, "LfsLockOwner": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "LfsPointerDto": { "type": "object", "required": [ "version" ], "properties": { "oid": { "type": [ "string", "null" ] }, "size": { "type": [ "integer", "null" ], "format": "int64" }, "version": { "type": "string" } } }, "LfsVerifyLocksResponse": { "type": "object", "properties": { "next_cursor": { "type": [ "string", "null" ] }, "ours": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } }, "theirs": { "type": "array", "items": { "$ref": "#/components/schemas/LfsLock" } } } }, "LicenseDto": { "type": "object", "required": [ "name", "display_name", "body", "created_at", "updated_at" ], "properties": { "body": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": [ "string", "null" ] } } }, "LinkIssueCmd": { "type": "object", "required": [ "space_name", "repo_name", "pull_ref" ], "properties": { "pull_ref": { "type": "string", "description": "PR 编号或 UUID。" }, "repo_name": { "type": "string" }, "space_name": { "type": "string" } } }, "ListBoardQuery": { "type": "object", "properties": { "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "q": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "ListCommentQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "order": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "sort": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CommentSort" } ] } }, "additionalProperties": false }, "ListContentHistoryQuery": { "type": "object", "properties": { "comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "ListEventQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "ListIssueMemberQuery": { "type": "object", "properties": { "kind": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueMemberKind" } ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "ListIssueQuery": { "type": "object", "properties": { "assignee_id": { "type": [ "string", "null" ], "description": "One id or a comma-separated id list (`a,b`); matches any of them." }, "author_id": { "type": [ "integer", "null" ], "format": "int64" }, "label_id": { "type": [ "string", "null" ], "description": "One id or a comma-separated id list (`a,b`); matches any of them." }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "milestone_id": { "type": [ "string", "null" ], "description": "One id or a comma-separated id list (`a,b`); `none` matches issues\nwithout a milestone. Any of the listed values matches." }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "order": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SortOrder" } ] }, "priority": { "type": [ "string", "null" ], "description": "One priority or a comma-separated list (`high,urgent`)." }, "q": { "type": [ "string", "null" ] }, "sort": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueSort" } ] }, "state": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssueState" } ] } }, "additionalProperties": false }, "ListIssueUserQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "ListLabelQuery": { "type": "object", "properties": { "is_archived": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "q": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "ListLimitQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } }, "ListMessageQuery": { "type": "object", "properties": { "after_seq": { "type": [ "integer", "null" ], "format": "int64" }, "author_id": { "type": [ "integer", "null" ], "format": "int64" }, "before_seq": { "type": [ "integer", "null" ], "format": "int64" }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" } }, "additionalProperties": false }, "ListMilestoneQuery": { "type": "object", "properties": { "is_closed": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "q": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "ListThreadQuery": { "type": "object", "properties": { "archived": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } }, "ListTrackedTimeQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "user_id": { "type": [ "integer", "null" ], "format": "int64" } }, "additionalProperties": false }, "LoginCodeRequest": { "type": "object", "required": [ "email", "pow_payload" ], "properties": { "email": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" } } }, "LoginCodeResponse": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "LoginCodeVerifyRequest": { "type": "object", "required": [ "email", "email_code", "pow_payload" ], "properties": { "email": { "type": "string" }, "email_code": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" } } }, "LoginVerifyRequest": { "type": "object", "required": [ "challenge", "code" ], "properties": { "challenge": { "type": "string" }, "code": { "type": "string" } } }, "LogoutResponse": { "type": "object", "properties": { "user_id": { "type": [ "integer", "null" ], "format": "int64" } } }, "MarkIssueReadCmd": { "type": "object", "required": [ "read" ], "properties": { "read": { "type": "boolean" } } }, "MarkNotificationsReadCmd": { "type": "object", "properties": { "all": { "type": "boolean" }, "ids": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } } } }, "MarkReadCmd": { "type": "object", "properties": { "message_id": { "type": [ "string", "null" ], "format": "uuid" }, "seq": { "type": [ "integer", "null" ], "format": "int64" } } }, "MarkThreadReadCmd": { "type": "object", "properties": { "message_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "MarkedCountResp": { "type": "object", "required": [ "marked" ], "properties": { "marked": { "type": "integer", "format": "int64", "minimum": 0 } } }, "MeResp": { "type": "object", "required": [ "user" ], "properties": { "profile": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProfileDto" } ] }, "user": { "$ref": "#/components/schemas/UserMeDto" } } }, "MeResponse": { "type": "object", "required": [ "user_id", "username", "email", "is_admin", "created_at", "version" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "email_verified_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_admin": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } }, "MemberDto": { "type": "object", "required": [ "space_id", "status", "joined_at", "created_at", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "hide_muted_channels": { "type": "boolean" }, "invited_at": { "type": [ "string", "null" ], "format": "date-time" }, "invited_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/MemberStatus" }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "MemberListQuery": { "type": "object", "properties": { "include_banned": { "type": [ "boolean", "null" ] }, "include_inactive": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "MemberStatus": { "type": "string", "description": "会籍状态,由 `joined_at` / `left_at` / `banned_at` 推导,供 API 层展示。", "enum": [ "Active", "Inactive", "Left", "Removed", "Banned" ] }, "MemberSummary": { "type": "object", "required": [ "id", "organization_id", "user_id", "username", "role", "role_keys", "permissions", "joined_at", "join_method", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels", "ban_allow_agent_join", "ban_allow_speak", "ban_allow_push_repo", "ban_allow_comment_any", "version" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "ban_allow_agent_join": { "type": "boolean" }, "ban_allow_comment_any": { "type": "boolean" }, "ban_allow_push_repo": { "type": "boolean" }, "ban_allow_speak": { "type": "boolean" }, "ban_expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "ban_reason": { "type": [ "string", "null" ] }, "banned_at": { "type": [ "string", "null" ], "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "hide_muted_channels": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "invited_by": { "type": [ "integer", "null" ], "format": "int64" }, "join_method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "type": "string" } }, "role": { "$ref": "#/components/schemas/SpaceMemberRole" }, "role_keys": { "type": "array", "items": { "type": "string" } }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } }, "MemeDto": { "type": "object", "required": [ "id", "name", "content_type", "url", "size", "created_at" ], "properties": { "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "MergeCommitDto": { "type": "object", "required": [ "sha", "subject", "message", "author_name", "author_email", "author_at", "parents" ], "properties": { "author_at": { "type": "string", "format": "date-time" }, "author_email": { "type": "string" }, "author_name": { "type": "string" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "sha": { "type": "string" }, "subject": { "type": "string" } } }, "MergeGateDto": { "type": "object", "required": [ "allowed", "reasons", "protected", "required_approvals", "approvals", "change_requests", "outdated", "bypassed" ], "properties": { "allowed": { "type": "boolean" }, "approvals": { "type": "integer", "format": "int32" }, "bypassed": { "type": "boolean" }, "change_requests": { "type": "integer", "format": "int32" }, "outdated": { "type": "boolean" }, "protected": { "type": "boolean" }, "reasons": { "type": "array", "items": { "type": "string" } }, "required_approvals": { "type": "integer", "format": "int32" } } }, "MergeMethod": { "type": "string", "enum": [ "merge", "squash", "rebase" ] }, "MergePullCmd": { "type": "object", "properties": { "delete_branch_after_merge": { "type": [ "boolean", "null" ] }, "expect_head_sha": { "type": [ "string", "null" ] }, "fast_forward_only": { "type": [ "boolean", "null" ], "description": "允许在无冲突时直接快进(method=merge 时生效)。" }, "message": { "type": [ "string", "null" ] }, "method": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MergeMethod", "description": "merge | squash | rebase" } ] }, "title": { "type": [ "string", "null" ] } } }, "MergePullDto": { "type": "object", "required": [ "pull", "result", "summary" ], "properties": { "pull": { "$ref": "#/components/schemas/PullDto" }, "result": { "$ref": "#/components/schemas/MergeResultDto" }, "summary": { "$ref": "#/components/schemas/PullSummaryDto" } } }, "MergeResultDto": { "type": "object", "required": [ "method", "base_ref", "old_sha", "new_sha", "head_sha", "rewritten" ], "properties": { "base_ref": { "type": "string" }, "head_sha": { "type": "string" }, "method": { "type": "string", "description": "`fast_forward` | `merge_commit` | `squash` | `rebase`" }, "new_sha": { "type": "string" }, "old_sha": { "type": "string" }, "rewritten": { "type": "array", "items": { "type": "string" }, "description": "rebase 时重写出来的提交(按时间正序)。" } } }, "MergeStatusDto": { "type": "object", "required": [ "mergeable", "conflicts", "fast_forwardable" ], "properties": { "conflicts": { "type": "array", "items": { "type": "string" } }, "fast_forwardable": { "type": "boolean" }, "mergeable": { "type": "boolean" } } }, "MessageDto": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "thread_broadcast", "message_type", "content", "mentions", "mention_everyone", "attachments", "has_thread", "pinned", "seq", "created_at" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "author_id": { "type": "integer", "format": "int64" }, "author_type": { "$ref": "#/components/schemas/AuthorType" }, "content": { "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" }, "embeds": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEmbed" } }, "forwarded_from_id": { "type": [ "string", "null" ], "format": "uuid" }, "has_thread": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "mention_everyone": { "type": "boolean" }, "mentions": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "message_type": { "$ref": "#/components/schemas/ChatMessageType" }, "pinned": { "type": "boolean" }, "pinned_at": { "type": [ "string", "null" ], "format": "date-time" }, "pinned_by_id": { "type": [ "integer", "null" ], "format": "int64" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionAggDto" } }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "seq": { "type": "integer", "format": "int64" }, "thread_broadcast": { "type": "boolean" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "webhook_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "MessageEditDto": { "type": "object", "required": [ "id", "message_id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "editor": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" } } }, "MessageEmbed": { "type": "object", "description": "Discord 风格的消息 embed。\n\n`platform` / `kind` / `src` / `image_url` 等字段是旧消息与旧缓存的兼容外壳:\n历史 `chat_message.embeds` 里存的还是老结构,反序列化时不能丢字段;新写入\n同时填富模型和这些兼容字段,前端可以逐步迁移。", "properties": { "aspect": { "type": [ "string", "null" ], "default": null }, "audio": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedMedia" } ], "default": null }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedAuthor" } ], "default": null }, "category": { "type": [ "string", "null" ], "default": null }, "children": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/MessageEmbed" }, "default": null }, "color": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "description": { "type": [ "string", "null" ], "default": null }, "fields": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/EmbedField" }, "default": null }, "footer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedFooter" } ], "default": null }, "height": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "html": { "type": [ "string", "null" ], "default": null }, "html_height": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "html_width": { "type": [ "integer", "null" ], "format": "int32", "default": null, "minimum": 0 }, "image": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedMedia" } ], "default": null }, "image_url": { "type": [ "string", "null" ], "default": null }, "kind": { "type": [ "string", "null" ], "default": null }, "nsfw": { "type": [ "boolean", "null" ], "default": null }, "platform": { "type": [ "string", "null" ], "default": null }, "platform_name": { "type": [ "string", "null" ], "default": null }, "provider": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedProvider" } ], "default": null }, "site_name": { "type": [ "string", "null" ], "default": null }, "src": { "type": [ "string", "null" ], "default": null }, "thumbnail": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedMedia" } ], "default": null }, "timestamp": { "type": [ "string", "null" ], "default": null }, "title": { "type": [ "string", "null" ], "default": null }, "type": { "type": "string", "default": "link" }, "url": { "type": [ "string", "null" ], "default": null }, "video": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EmbedMedia" } ], "default": null } } }, "MessageNotifications": { "type": "string", "description": "会籍的通知偏好,对应旧 `space_members.message_notifications`。\n旧表用 0/1/2 存,这里用字符串存,便于跨服务读写时直接透传。", "enum": [ "all", "mentions", "nothing" ] }, "MessagePath": { "type": "object", "required": [ "room_id", "message_id" ], "properties": { "message_id": { "type": "string", "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" } } }, "MilestoneDto": { "type": "object", "required": [ "id", "board_id", "name", "is_closed", "issues_count", "closed_issues_count", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "closed_issues_count": { "type": "integer", "format": "int64" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_closed": { "type": "boolean" }, "issues_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "MilestonePath": { "type": "object", "required": [ "space_name", "board_id", "milestone_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "milestone_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "MoveDirCmd": { "type": "object", "properties": { "parent_dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": [ "integer", "null" ], "format": "int64" } } }, "MySpaceDto": { "type": "object", "required": [ "space", "permissions" ], "properties": { "permissions": { "type": "array", "items": { "type": "string" } }, "space": { "$ref": "#/components/schemas/SpaceDto" } } }, "NoData": { "default": null }, "NotificationDto": { "type": "object", "required": [ "id", "notification_type", "title", "created_at" ], "properties": { "actor_id": { "type": [ "integer", "null" ], "format": "int64" }, "body": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Value" } ] }, "id": { "type": "string", "format": "uuid" }, "notification_type": { "$ref": "#/components/schemas/NotificationType" }, "read_at": { "type": [ "string", "null" ], "format": "date-time" }, "title": { "type": "string" } } }, "NotificationType": { "type": "string", "enum": [ "mention", "reply", "follow", "invite", "assignment", "system" ] }, "ObjectKind": { "type": "string", "enum": [ "merge", "squash" ] }, "OpenDmCmd": { "type": "object", "properties": { "peer_user_id": { "type": [ "integer", "null" ], "format": "int64" }, "peer_user_ids": { "type": [ "array", "null" ], "items": { "type": "integer", "format": "int64" } } } }, "OrgListQuery": { "type": "object", "properties": { "include_archived": { "type": [ "boolean", "null" ] }, "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "OrganizationSummary": { "type": "object", "required": [ "id", "slug", "name", "status", "owner_user_id", "member_count", "version", "created_at", "updated_at", "join_policy", "allow_join", "require_email_verified", "require_mfa", "member_must_enable_2fa", "allow_invite", "allow_join_level" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "type": "integer", "format": "int32" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "join_policy": { "$ref": "#/components/schemas/SpaceJoinPolicy" }, "member_count": { "type": "integer", "format": "int64" }, "member_must_enable_2fa": { "type": "boolean" }, "my_role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceMemberRole" } ] }, "name": { "type": "string" }, "owner_user_id": { "type": "integer", "format": "int64" }, "require_email_verified": { "type": "boolean" }, "require_mfa": { "type": "boolean" }, "slug": { "type": "string" }, "status": { "$ref": "#/components/schemas/SpaceStatus" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" }, "welcome_message": { "type": [ "string", "null" ] } } }, "OutboundWebhookDto": { "type": "object", "required": [ "id", "room_id", "name", "url", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_status": { "type": [ "string", "null" ] }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "url": { "type": "string" } } }, "OutboundWebhookSecretDto": { "type": "object", "required": [ "id", "room_id", "name", "url", "secret", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "secret": { "type": "string" }, "url": { "type": "string" } } }, "PackStatsDto": { "type": "object", "required": [ "loose_count", "size_bytes" ], "properties": { "loose_count": { "type": "integer", "format": "int64" }, "size_bytes": { "type": "integer", "format": "int64" } } }, "PageQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, "additionalProperties": false }, "Page_BookmarkDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "title", "position", "created_by_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by_id": { "type": "integer", "format": "int64" }, "emoji": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "title": { "type": "string" }, "url": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_BranchDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "commit_sha", "is_protected", "is_deleted", "created_at", "updated_at" ], "properties": { "commit_sha": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_deleted": { "type": "boolean" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_BranchInfoDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "commit_sha", "is_protected" ], "properties": { "commit_message": { "type": [ "string", "null" ] }, "commit_sha": { "type": "string" }, "is_protected": { "type": "boolean" }, "name": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_CommitDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "tree_id", "parents", "author_name", "author_email", "author_time", "committer_name", "committer_email", "committer_time", "message" ], "properties": { "author_email": { "type": "string" }, "author_name": { "type": "string" }, "author_time": { "type": "integer", "format": "int64" }, "committer_email": { "type": "string" }, "committer_name": { "type": "string" }, "committer_time": { "type": "integer", "format": "int64" }, "id": { "type": "string" }, "message": { "type": "string" }, "parents": { "type": "array", "items": { "type": "string" } }, "tree_id": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_DmDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "name", "last_read_seq", "tip_seq", "unread_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "members": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "name": { "type": "string" }, "peer": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_DraftDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "room_id", "content", "updated_at" ], "properties": { "content": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_EmojiDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "space_id", "name", "animated", "disabled", "created_at" ], "properties": { "animated": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "space_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_InviteSummary": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "organization_id", "method", "created_by", "max_uses", "uses", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "created_by": { "type": "integer", "format": "int64" }, "email": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "max_uses": { "type": "integer", "format": "int32" }, "method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "organization_id": { "type": "string", "format": "uuid" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "role_id": { "type": [ "string", "null" ], "format": "uuid" }, "target_user_id": { "type": [ "integer", "null" ], "format": "int64" }, "uses": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_IssueListItemDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "board_id", "number", "title", "labels", "priority", "assignees", "state", "created_at" ], "properties": { "assignees": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "board_id": { "type": "string", "format": "uuid" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "created_at": { "type": "string", "format": "date-time" }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "labels": { "type": "array", "items": { "$ref": "#/components/schemas/LabelDto" }, "description": "Chips the list rows render; the detail view fetches these separately." }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "number": { "type": "integer", "format": "int32" }, "priority": { "$ref": "#/components/schemas/IssuePriority" }, "state": { "$ref": "#/components/schemas/IssueState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_LicenseDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "display_name", "body", "created_at", "updated_at" ], "properties": { "body": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_MemberSummary": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "organization_id", "user_id", "username", "role", "role_keys", "permissions", "joined_at", "join_method", "message_notifications", "muted", "mobile_push", "suppress_everyone", "suppress_roles", "hide_muted_channels", "ban_allow_agent_join", "ban_allow_speak", "ban_allow_push_repo", "ban_allow_comment_any", "version" ], "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "ban_allow_agent_join": { "type": "boolean" }, "ban_allow_comment_any": { "type": "boolean" }, "ban_allow_push_repo": { "type": "boolean" }, "ban_allow_speak": { "type": "boolean" }, "ban_expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "ban_reason": { "type": [ "string", "null" ] }, "banned_at": { "type": [ "string", "null" ], "format": "date-time" }, "displayname": { "type": [ "string", "null" ] }, "hide_muted_channels": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "invited_by": { "type": [ "integer", "null" ], "format": "int64" }, "join_method": { "$ref": "#/components/schemas/SpaceJoinMethod" }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "message_notifications": { "$ref": "#/components/schemas/MessageNotifications" }, "mobile_push": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "type": "string" } }, "role": { "$ref": "#/components/schemas/SpaceMemberRole" }, "role_keys": { "type": "array", "items": { "type": "string" } }, "suppress_everyone": { "type": "boolean" }, "suppress_roles": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "version": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_MessageDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "thread_broadcast", "message_type", "content", "mentions", "mention_everyone", "attachments", "has_thread", "pinned", "seq", "created_at" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentDto" } }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "author_id": { "type": "integer", "format": "int64" }, "author_type": { "$ref": "#/components/schemas/AuthorType" }, "content": { "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" }, "embeds": { "type": "array", "items": { "$ref": "#/components/schemas/MessageEmbed" } }, "forwarded_from_id": { "type": [ "string", "null" ], "format": "uuid" }, "has_thread": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "mention_everyone": { "type": "boolean" }, "mentions": { "type": "array", "items": { "type": "integer", "format": "int64" } }, "message_type": { "$ref": "#/components/schemas/ChatMessageType" }, "pinned": { "type": "boolean" }, "pinned_at": { "type": [ "string", "null" ], "format": "date-time" }, "pinned_by_id": { "type": [ "integer", "null" ], "format": "int64" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/ReactionAggDto" } }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "seq": { "type": "integer", "format": "int64" }, "thread_broadcast": { "type": "boolean" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "webhook_id": { "type": [ "string", "null" ], "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_MySpaceDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "space", "permissions" ], "properties": { "permissions": { "type": "array", "items": { "type": "string" } }, "space": { "$ref": "#/components/schemas/SpaceDto" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_NotificationDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "notification_type", "title", "created_at" ], "properties": { "actor_id": { "type": [ "integer", "null" ], "format": "int64" }, "body": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Value" } ] }, "id": { "type": "string", "format": "uuid" }, "notification_type": { "$ref": "#/components/schemas/NotificationType" }, "read_at": { "type": [ "string", "null" ], "format": "date-time" }, "title": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_OrganizationSummary": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "slug", "name", "status", "owner_user_id", "member_count", "version", "created_at", "updated_at", "join_policy", "allow_join", "require_email_verified", "require_mfa", "member_must_enable_2fa", "allow_invite", "allow_join_level" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "type": "integer", "format": "int32" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "join_policy": { "$ref": "#/components/schemas/SpaceJoinPolicy" }, "member_count": { "type": "integer", "format": "int64" }, "member_must_enable_2fa": { "type": "boolean" }, "my_role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceMemberRole" } ] }, "name": { "type": "string" }, "owner_user_id": { "type": "integer", "format": "int64" }, "require_email_verified": { "type": "boolean" }, "require_mfa": { "type": "boolean" }, "slug": { "type": "string" }, "status": { "$ref": "#/components/schemas/SpaceStatus" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" }, "welcome_message": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_PullCommentDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "pull_request_id", "body", "resolved", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": [ "integer", "null" ], "format": "int32" }, "parent_comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": [ "string", "null" ] }, "pull_request_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "side": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_PullDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "repo_id", "number", "title", "body", "state", "is_draft", "auto_merge", "locked", "head", "base", "merge_method", "additions", "deletions", "files_changed", "created_at" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "auto_merge": { "type": "boolean" }, "base": { "$ref": "#/components/schemas/PullRefDto" }, "body": { "type": "string" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "commits_ahead": { "type": [ "integer", "null" ], "format": "int64" }, "commits_behind": { "type": [ "integer", "null" ], "format": "int64" }, "conflicts": { "type": [ "array", "null" ], "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head": { "$ref": "#/components/schemas/PullRefDto" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "merge_method": { "$ref": "#/components/schemas/MergeMethod" }, "mergeable": { "type": [ "boolean", "null" ] }, "mergeable_state": { "type": [ "string", "null" ] }, "merged_at": { "type": [ "string", "null" ], "format": "date-time" }, "merged_commit_sha": { "type": [ "string", "null" ] }, "merger": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "number": { "type": "integer", "format": "int32" }, "repo_id": { "type": "string", "format": "uuid" }, "squash_commit_sha": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/PullState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_PullEventDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "pull_request_id", "event_type", "created_at" ], "properties": { "actor": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "commit_sha": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "event_type": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "pull_request_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_PushSubscriptionDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "endpoint", "platform", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "endpoint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "platform": { "$ref": "#/components/schemas/PushSubscriptionPlatform" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_RepoSummaryDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "default_branch", "stars_count", "watchers_count", "is_private", "is_archived", "size", "updated_at" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "default_branch": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "is_private": { "type": "boolean" }, "license_name": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "primary_language": { "type": [ "string", "null" ] }, "size": { "type": "integer", "format": "int64" }, "stars_count": { "type": "integer", "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "watchers_count": { "type": "integer", "format": "int32" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_RoomBriefDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "owner_id", "kind", "name", "position", "is_private", "nsfw", "unread_count", "unread_mentions", "favorite", "muted", "hidden", "member_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "member_count": { "type": "integer", "format": "int64" }, "muted": { "type": "boolean" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_SavedMessageDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "channel_id", "message_id", "saved_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "saved_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_SessionDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "last_seen_at", "created_at", "expires_at", "is_revoked", "is_current" ], "properties": { "client_ip_hash": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "device_id": { "type": [ "string", "null" ], "format": "uuid" }, "expires_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_current": { "type": "boolean" }, "is_revoked": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/SessionKind" }, "last_seen_at": { "type": "string", "format": "date-time" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent_hash": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_SpaceDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "lower_name", "name", "is_private", "is_active", "allow_join", "allow_invite", "members_count", "allow_join_level", "member_must_enable_2fa", "created_at", "updated_at" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "$ref": "#/components/schemas/AllowJoinLevel" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "lower_name": { "type": "string" }, "member_must_enable_2fa": { "type": "boolean" }, "members_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": "string", "format": "date-time" }, "welcome_message": { "type": [ "string", "null" ] }, "welcome_object": { "type": [ "string", "null" ], "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_SshKeySummary": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "algorithm", "fingerprint", "public_key", "created_at" ], "properties": { "algorithm": { "$ref": "#/components/schemas/SshKeyAlgorithm" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "fingerprint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "public_key": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_StargazerDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "starred_at" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "starred_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_TagDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "name", "tag_type", "target_sha" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "tag_type": { "$ref": "#/components/schemas/TagType" }, "tagger_email": { "type": [ "string", "null" ] }, "tagger_name": { "type": [ "string", "null" ] }, "target_sha": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_ThreadDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "root_message_id", "owner_id", "reply_count", "participant_count", "archived", "locked", "created_at", "updated_at" ], "properties": { "archived": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "last_reply_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_reply_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "name": { "type": [ "string", "null" ] }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "participant_count": { "type": "integer", "format": "int64" }, "reply_count": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "root_message_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_TopicDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_TopicRepoDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "repo_id", "repo_name", "space_name", "is_private" ], "properties": { "is_private": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "repo_name": { "type": "string" }, "space_name": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_UserReportDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "reported_id", "reason", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "evidence": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" }, "resolution_note": { "type": [ "string", "null" ] }, "status": { "$ref": "#/components/schemas/ReportStatus" }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_WatcherDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "mode", "watching_since" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "watching_since": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "Page_WebhookDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "name", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64", "minimum": 0 } } }, "ParsedPatchDto": { "type": "object", "required": [ "files", "additions", "deletions" ], "properties": { "additions": { "type": "integer", "format": "int64" }, "deletions": { "type": "integer", "format": "int64" }, "files": { "type": "array", "items": { "type": "string" } } } }, "PasswordResetConfirmRequest": { "type": "object", "required": [ "token", "password_hash", "pow_payload" ], "properties": { "password_hash": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" }, "token": { "type": "string" } } }, "PasswordResetConfirmResponse": { "type": "object", "required": [ "user_id" ], "properties": { "user_id": { "type": "integer", "format": "int64" } } }, "PasswordResetRequest": { "type": "object", "required": [ "email", "pow_payload" ], "properties": { "email": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" } } }, "PasswordResetResponse": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "PatchApplyBody": { "type": "object", "required": [ "patch", "base" ], "properties": { "base": { "type": "string" }, "patch": { "type": "string" } } }, "PatchDto": { "type": "object", "required": [ "content", "size" ], "properties": { "content": { "type": "string" }, "size": { "type": "integer", "format": "int64" } } }, "PathLastUpdated": { "type": "object", "required": [ "path", "object_type", "last_updated", "commit_id" ], "properties": { "commit_id": { "type": "string" }, "last_updated": { "type": "integer", "format": "int64" }, "object_type": { "type": "integer", "format": "int32" }, "path": { "type": "string" } } }, "PathLogEntryDto": { "type": "object", "required": [ "path", "short_sha", "date", "author", "subject" ], "properties": { "author": { "type": "string" }, "date": { "type": "string" }, "path": { "type": "string" }, "short_sha": { "type": "string" }, "subject": { "type": "string" } } }, "PermissionCheck": { "type": "object", "required": [ "allowed", "reason", "matched_by", "organization_version" ], "properties": { "allowed": { "type": "boolean" }, "matched_by": { "type": "string" }, "organization_version": { "type": "integer", "format": "int32" }, "reason": { "type": "string" } } }, "PermissionEffect": { "type": "string", "enum": [ "allow", "deny" ] }, "PermissionGrant": { "type": "object", "required": [ "permission", "effect" ], "properties": { "effect": { "$ref": "#/components/schemas/PermissionEffect" }, "permission": { "type": "string" } } }, "PinCmd": { "type": "object", "required": [ "pinned" ], "properties": { "pinned": { "type": "boolean" } } }, "PinDto": { "type": "object", "required": [ "id", "board_id", "pin_order", "created_at" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "pin_order": { "type": "integer", "format": "int32" } } }, "PinPath": { "type": "object", "required": [ "space_name", "board_id", "pin_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "pin_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "PowProofRequest": { "type": "object", "required": [ "nonce", "payload" ], "properties": { "nonce": { "type": "integer", "format": "int64", "minimum": 0 }, "payload": { "type": "array", "items": { "type": "integer", "format": "int32", "minimum": 0 } } } }, "PresenceDto": { "type": "object", "required": [ "user_id", "status", "activities", "online" ], "properties": { "activities": {}, "last_seen_at": { "type": [ "string", "null" ], "format": "date-time" }, "online": { "type": "boolean" }, "status": { "$ref": "#/components/schemas/PresenceStatus" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "PresenceStatus": { "type": "string", "enum": [ "Active", "Away", "Dnd", "Offline" ] }, "ProfileDetailDto": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "updated_at" ], "properties": { "accent_color": { "type": [ "string", "null" ] }, "avatar_url": { "type": "string" }, "banner_url": { "type": [ "string", "null" ] }, "bio": { "type": [ "string", "null" ] }, "company": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "location": { "type": [ "string", "null" ] }, "pronouns": { "type": [ "string", "null" ] }, "real_name": { "type": [ "string", "null" ] }, "show_activity": { "type": [ "boolean", "null" ] }, "show_email": { "type": [ "boolean", "null" ] }, "show_location": { "type": [ "boolean", "null" ] }, "show_real_name": { "type": [ "boolean", "null" ] }, "updated_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "visibility": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProfileVisibility" } ] }, "website": { "type": [ "string", "null" ] } } }, "ProfileDto": { "type": "object", "required": [ "show_email", "show_location", "show_real_name", "show_activity" ], "properties": { "bio": { "type": [ "string", "null" ] }, "company": { "type": [ "string", "null" ] }, "date_of_birth": { "type": [ "string", "null" ], "format": "date" }, "location": { "type": [ "string", "null" ] }, "privacy_agreed_at": { "type": [ "string", "null" ], "format": "date-time" }, "pronouns": { "type": [ "string", "null" ] }, "real_name": { "type": [ "string", "null" ] }, "show_activity": { "type": "boolean" }, "show_email": { "type": "boolean" }, "show_location": { "type": "boolean" }, "show_real_name": { "type": "boolean" }, "website": { "type": [ "string", "null" ] } } }, "ProfileVisibility": { "type": "string", "enum": [ "Public", "RegisteredOnly", "MembersOnly", "Private" ] }, "PruneResultDto": { "type": "object", "required": [ "reachable", "unreachable", "total" ], "properties": { "reachable": { "type": "integer", "format": "int64" }, "total": { "type": "integer", "format": "int64" }, "unreachable": { "type": "integer", "format": "int64" } } }, "PullAssigneeDto": { "type": "object", "required": [ "id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "PullChecksDto": { "type": "object", "required": [ "head_sha", "statuses" ], "properties": { "head_sha": { "type": "string" }, "statuses": { "type": "array", "items": { "$ref": "#/components/schemas/CommitStatusDto" } } } }, "PullCommentDto": { "type": "object", "required": [ "id", "pull_request_id", "body", "resolved", "created_at" ], "properties": { "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "body": { "type": "string" }, "commit_sha": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "line": { "type": [ "integer", "null" ], "format": "int32" }, "parent_comment_id": { "type": [ "string", "null" ], "format": "uuid" }, "path": { "type": [ "string", "null" ] }, "pull_request_id": { "type": "string", "format": "uuid" }, "resolved": { "type": "boolean" }, "resolved_by": { "type": [ "integer", "null" ], "format": "int64" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "side": { "type": [ "string", "null" ] }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "PullCommentThreadDto": { "type": "object", "description": "线程视图:顶层评论 + 其下全部回复(无递归,便于文档生成)。", "required": [ "root", "replies" ], "properties": { "replies": { "type": "array", "items": { "$ref": "#/components/schemas/PullCommentDto" } }, "root": { "$ref": "#/components/schemas/PullCommentDto" } } }, "PullDto": { "type": "object", "required": [ "id", "repo_id", "number", "title", "body", "state", "is_draft", "auto_merge", "locked", "head", "base", "merge_method", "additions", "deletions", "files_changed", "created_at" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "author": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "auto_merge": { "type": "boolean" }, "base": { "$ref": "#/components/schemas/PullRefDto" }, "body": { "type": "string" }, "closed_at": { "type": [ "string", "null" ], "format": "date-time" }, "commits_ahead": { "type": [ "integer", "null" ], "format": "int64" }, "commits_behind": { "type": [ "integer", "null" ], "format": "int64" }, "conflicts": { "type": [ "array", "null" ], "items": { "type": "string" } }, "created_at": { "type": "string", "format": "date-time" }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head": { "$ref": "#/components/schemas/PullRefDto" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "merge_method": { "$ref": "#/components/schemas/MergeMethod" }, "mergeable": { "type": [ "boolean", "null" ] }, "mergeable_state": { "type": [ "string", "null" ] }, "merged_at": { "type": [ "string", "null" ], "format": "date-time" }, "merged_commit_sha": { "type": [ "string", "null" ] }, "merger": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "number": { "type": "integer", "format": "int32" }, "repo_id": { "type": "string", "format": "uuid" }, "squash_commit_sha": { "type": [ "string", "null" ] }, "state": { "$ref": "#/components/schemas/PullState" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "PullEventDto": { "type": "object", "required": [ "id", "pull_request_id", "event_type", "created_at" ], "properties": { "actor": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "commit_sha": { "type": [ "string", "null" ] }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "event_type": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "pull_request_id": { "type": "string", "format": "uuid" } } }, "PullGateDto": { "type": "object", "required": [ "head_sha", "mergeable", "conflicts", "gate", "pending_review_requests" ], "properties": { "conflicts": { "type": "array", "items": { "type": "string" } }, "gate": { "$ref": "#/components/schemas/MergeGateDto" }, "head_sha": { "type": "string" }, "mergeable": { "type": "boolean" }, "pending_review_requests": { "type": "integer", "format": "int32" } } }, "PullRefDto": { "type": "object", "required": [ "label", "branch", "sha" ], "properties": { "branch": { "type": "string" }, "label": { "type": "string" }, "repo_id": { "type": [ "string", "null" ], "format": "uuid" }, "sha": { "type": "string" } } }, "PullReviewDto": { "type": "object", "required": [ "id", "pull_request_id", "state", "commit_sha", "official", "comment_count", "created_at" ], "properties": { "comment_count": { "type": "integer", "format": "int64", "minimum": 0 }, "commit_sha": { "type": "string" }, "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "official": { "type": "boolean" }, "pull_request_id": { "type": "string", "format": "uuid" }, "state": { "$ref": "#/components/schemas/ReviewState" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "PullReviewerDto": { "type": "object", "required": [ "id", "state", "required", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "requested_by": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "required": { "type": "boolean" }, "review_id": { "type": [ "string", "null" ], "format": "uuid" }, "state": { "$ref": "#/components/schemas/ReviewerState" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "PullSort": { "type": "string", "enum": [ "number", "created", "updated" ] }, "PullState": { "type": "string", "enum": [ "open", "closed", "merged" ] }, "PullSummaryDto": { "type": "object", "required": [ "head_sha", "base_sha", "mergeable", "mergeable_state", "conflicts", "commits_ahead", "commits_behind", "additions", "deletions", "files_changed" ], "properties": { "additions": { "type": "integer", "format": "int32" }, "base_sha": { "type": "string" }, "commits_ahead": { "type": "integer", "format": "int64" }, "commits_behind": { "type": "integer", "format": "int64" }, "conflicts": { "type": "array", "items": { "type": "string" } }, "deletions": { "type": "integer", "format": "int32" }, "files_changed": { "type": "integer", "format": "int32" }, "head_sha": { "type": "string" }, "merge_base": { "type": [ "string", "null" ] }, "mergeable": { "type": "boolean" }, "mergeable_state": { "type": "string" } } }, "PushConfigDto": { "type": "object", "description": "前端注册 Service Worker 所需的公开参数。\n\n只有公钥是公开的(它就是浏览器 `applicationServerKey` 要的东西),私钥永远\n不出现在任何响应里。`enabled=false` 时前端把整个\"系统通知\"开关藏起来,\n而不是让用户点了才发现服务端没开。", "required": [ "enabled", "public_key" ], "properties": { "enabled": { "type": "boolean" }, "public_key": { "type": "string" } } }, "PushResultDto": { "type": "object", "required": [ "pushed", "rejected" ], "properties": { "pushed": { "type": "array", "items": { "type": "string" } }, "rejected": { "type": "array", "items": { "type": "string" } } } }, "PushSubscriptionDto": { "type": "object", "required": [ "id", "endpoint", "platform", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "endpoint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "platform": { "$ref": "#/components/schemas/PushSubscriptionPlatform" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent": { "type": [ "string", "null" ] } } }, "PushSubscriptionPlatform": { "type": "string", "enum": [ "WebPush", "AndroidFcm", "IosApns" ] }, "RawDownloadDto": { "type": "object", "required": [ "id", "size", "is_lfs_pointer" ], "properties": { "id": { "type": "string" }, "is_lfs_pointer": { "type": "boolean" }, "size": { "type": "integer", "format": "int64" } } }, "ReactionAggDto": { "type": "object", "required": [ "emoji", "count", "me" ], "properties": { "count": { "type": "integer", "format": "int64" }, "emoji": { "type": "string" }, "me": { "type": "boolean" } } }, "ReactionCmd": { "type": "object", "required": [ "emoji" ], "properties": { "emoji": { "type": "string" } } }, "ReactionDto": { "type": "object", "required": [ "id", "scope", "target_id", "emoji", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "emoji": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "scope": { "$ref": "#/components/schemas/ReactionScope" }, "target_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "ReactionPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "reaction_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "reaction_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "ReactionScope": { "type": "string", "enum": [ "issue", "comment" ] }, "ReactionUserDto": { "type": "object", "required": [ "emoji", "user", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "emoji": { "type": "string" }, "user": { "$ref": "#/components/schemas/UserDto" } } }, "ReadStateDto": { "type": "object", "required": [ "room_id", "last_read_seq", "tip_seq", "unread_count", "unread_mentions" ], "properties": { "last_read_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "last_read_seq": { "type": "integer", "format": "int64" }, "last_viewed_at": { "type": [ "string", "null" ], "format": "date-time" }, "room_id": { "type": "string", "format": "uuid" }, "tip_seq": { "type": "integer", "format": "int64" }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } }, "ReasonBody": { "type": "object", "properties": { "reason": { "type": [ "string", "null" ] } } }, "RecentMentionDto": { "type": "object", "required": [ "id", "channel_id", "message_id", "created_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" } } }, "RecoveryCodesResp": { "type": "object", "required": [ "total", "used", "codes" ], "properties": { "codes": { "type": "array", "items": { "type": "string" } }, "total": { "type": "integer", "format": "int32", "minimum": 0 }, "used": { "type": "integer", "format": "int32", "minimum": 0 } } }, "RedeemInviteBody": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } }, "RedeemInviteResponse": { "type": "object", "required": [ "organization_id", "member_id", "joined" ], "properties": { "joined": { "type": "boolean" }, "member_id": { "type": "string", "format": "uuid" }, "organization_id": { "type": "string", "format": "uuid" } } }, "RegenerateRecoveryCodesCmd": { "type": "object", "required": [ "password" ], "properties": { "password": { "type": "string" } } }, "RegisterCodeRequest": { "type": "object", "required": [ "email", "pow_payload" ], "properties": { "email": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" } } }, "RegisterCodeResponse": { "type": "object", "required": [ "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "ReleaseDto": { "type": "object", "required": [ "id", "repo_id", "tag_name", "target", "title", "sha", "num_commits", "is_draft", "is_prerelease", "publisher_name", "created_at", "updated_at" ], "properties": { "content": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_draft": { "type": "boolean" }, "is_prerelease": { "type": "boolean" }, "num_commits": { "type": "integer", "format": "int32" }, "publisher": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "publisher_name": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "sha": { "type": "string" }, "tag_name": { "type": "string" }, "target": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "ReminderDto": { "type": "object", "required": [ "id", "room_id", "message_id", "remind_at", "status", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "message_preview": { "type": [ "string", "null" ] }, "note": { "type": [ "string", "null" ] }, "remind_at": { "type": "string", "format": "date-time" }, "room_id": { "type": "string", "format": "uuid" }, "status": { "$ref": "#/components/schemas/ReminderStatus" } } }, "ReminderStatus": { "type": "string", "enum": [ "Pending", "Done", "Cancelled", "Delivering" ] }, "RemoteAddBody": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string" } } }, "RemoteAuthDto": { "type": "object", "properties": { "token": { "type": [ "string", "null" ] }, "username": { "type": [ "string", "null" ] } } }, "RemoteDto": { "type": "object", "required": [ "name" ], "properties": { "fetch_url": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "push_url": { "type": [ "string", "null" ] } } }, "RemoteFetchBody": { "type": "object", "required": [ "remote" ], "properties": { "auth": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RemoteAuthDto" } ] }, "remote": { "type": "string" } } }, "RemoteImportBody": { "type": "object", "required": [ "url" ], "properties": { "auth": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RemoteAuthDto" } ] }, "url": { "type": "string" } } }, "RemotePushBody": { "type": "object", "required": [ "remote" ], "properties": { "auth": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RemoteAuthDto" } ] }, "refspec": { "type": [ "string", "null" ] }, "remote": { "type": "string" } } }, "RenameBranchCmd": { "type": "object", "required": [ "new_name" ], "properties": { "new_name": { "type": "string" } } }, "RepairDirResp": { "type": "object", "required": [ "scanned", "fixed" ], "properties": { "fixed": { "type": "integer", "format": "int64" }, "scanned": { "type": "integer", "format": "int64" } } }, "RepoDto": { "type": "object", "required": [ "id", "name", "default_branch", "watchers_count", "stars_count", "pulls_count", "commits_count", "branches_count", "tags_count", "enable_lfs", "is_private", "is_archived", "size", "git_size", "lfs_size", "object_format", "allow_pull_requests", "tab_order", "created_at", "updated_at" ], "properties": { "allow_pull_requests": { "type": "boolean", "description": "是否允许在本仓库创建合并请求(关闭后页签隐藏、接口拒绝)。" }, "archived_at": { "type": [ "string", "null" ], "format": "date-time" }, "avatar_url": { "type": [ "string", "null" ] }, "branches_count": { "type": "integer", "format": "int32" }, "commits_count": { "type": "integer", "format": "int32" }, "created_at": { "type": "string", "format": "date-time" }, "default_branch": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "enable_lfs": { "type": "boolean" }, "git_size": { "type": "integer", "format": "int64" }, "http_clone_url": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "is_private": { "type": "boolean" }, "last_pushed_at": { "type": [ "string", "null" ], "format": "date-time" }, "lfs_size": { "type": "integer", "format": "int64" }, "license_name": { "type": [ "string", "null" ] }, "me": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RepoMeDto" } ] }, "name": { "type": "string" }, "object_format": { "type": "string" }, "primary_language": { "type": [ "string", "null" ] }, "pulls_count": { "type": "integer", "format": "int32" }, "size": { "type": "integer", "format": "int64" }, "ssh_clone_url": { "type": [ "string", "null" ] }, "stars_count": { "type": "integer", "format": "int32" }, "storage_limit_size": { "type": [ "integer", "null" ], "format": "int64" }, "tab_order": { "type": "array", "items": { "type": "string" }, "description": "中间页签顺序;空数组 = 默认顺序。" }, "tags_count": { "type": "integer", "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "watchers_count": { "type": "integer", "format": "int32" }, "website": { "type": [ "string", "null" ] } } }, "RepoMeDto": { "type": "object", "required": [ "starred" ], "properties": { "starred": { "type": "boolean" }, "watch_mode": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/WatchMode" } ] } } }, "RepoRelDto": { "type": "object", "required": [ "id", "issue_id", "repo_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "repo_id": { "type": "string", "format": "uuid" } } }, "RepoRelPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "rel_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "rel_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "RepoSort": { "type": "string", "enum": [ "created_at", "updated_at", "stars", "name" ] }, "RepoStarDto": { "type": "object", "required": [ "user_id", "repo_id", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "repo_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "integer", "format": "int64" } } }, "RepoStarResp": { "type": "object", "required": [ "stars" ], "properties": { "stars": { "type": "integer", "format": "int32" } } }, "RepoSummaryDto": { "type": "object", "required": [ "id", "name", "default_branch", "stars_count", "watchers_count", "is_private", "is_archived", "size", "updated_at" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "default_branch": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_archived": { "type": "boolean" }, "is_private": { "type": "boolean" }, "license_name": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "primary_language": { "type": [ "string", "null" ] }, "size": { "type": "integer", "format": "int64" }, "stars_count": { "type": "integer", "format": "int32" }, "updated_at": { "type": "string", "format": "date-time" }, "watchers_count": { "type": "integer", "format": "int32" } } }, "RepoWatchDto": { "type": "object", "required": [ "user_id", "repo_id", "mode", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "repo_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" } } }, "ReportDto": { "type": "object", "required": [ "id", "reported_id", "reason", "status", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "evidence": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" }, "status": { "$ref": "#/components/schemas/ReportStatus" } } }, "ReportStatus": { "type": "string", "enum": [ "open", "under_review", "resolved", "dismissed" ] }, "RequestReviewersCmd": { "type": "object", "required": [ "reviewers" ], "properties": { "required": { "type": "boolean", "description": "是否计入必需审批人数。" }, "reviewers": { "type": "array", "items": { "type": "string" }, "description": "用户名或 UUID。" } } }, "ReviewIntent": { "type": "string", "enum": [ "approve", "request_changes", "comment", "pending" ] }, "ReviewState": { "type": "string", "enum": [ "approved", "changes_requested", "commented", "pending", "dismissed" ] }, "ReviewerState": { "type": "string", "enum": [ "requested", "approved", "changes_requested", "commented", "dismissed" ] }, "RoleSummary": { "type": "object", "required": [ "id", "organization_id", "key", "name", "rank", "system", "default_role", "self_assignable", "permissions", "member_count", "created_at", "updated_at", "version", "position" ], "properties": { "color": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "default_role": { "type": "boolean" }, "description": { "type": [ "string", "null" ] }, "emoji": { "type": [ "string", "null" ] }, "icon_hash": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "key": { "type": "string" }, "member_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "organization_id": { "type": "string", "format": "uuid" }, "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionGrant" } }, "position": { "type": "integer", "format": "int64" }, "rank": { "type": "integer", "format": "int32" }, "self_assignable": { "type": "boolean" }, "system": { "type": "boolean" }, "updated_at": { "type": "string", "format": "date-time" }, "version": { "type": "integer", "format": "int32" } } }, "RoomBriefDto": { "type": "object", "required": [ "id", "owner_id", "kind", "name", "position", "is_private", "nsfw", "unread_count", "unread_mentions", "favorite", "muted", "hidden", "member_count", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "last_message_id": { "type": [ "string", "null" ], "format": "uuid" }, "member_count": { "type": "integer", "format": "int64" }, "muted": { "type": "boolean" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "unread_count": { "type": "integer", "format": "int64" }, "unread_mentions": { "type": "integer", "format": "int64" } } }, "RoomDto": { "type": "object", "required": [ "id", "kind", "name", "position", "owner_id", "is_private", "nsfw", "is_active", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "dir_id": { "type": [ "string", "null" ], "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/RoomKind" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner_id": { "type": "integer", "format": "int64" }, "parent_id": { "type": [ "string", "null" ], "format": "uuid" }, "position": { "type": "integer", "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" }, "user_limit": { "type": [ "integer", "null" ], "format": "int32" } } }, "RoomKind": { "type": "string", "enum": [ "GuildRoom", "GroupDm", "Dm", "Category", "Text", "Voice", "Stage", "News", "Thread", "DirectMessage" ] }, "RoomNotificationLevel": { "type": "string", "enum": [ "Default", "All", "Mentions", "Nothing" ] }, "RoomSettingDto": { "type": "object", "required": [ "room_id", "notification_level", "muted", "favorite", "hidden" ], "properties": { "favorite": { "type": "boolean" }, "hidden": { "type": "boolean" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": "boolean" }, "notification_level": { "$ref": "#/components/schemas/RoomNotificationLevel" }, "room_id": { "type": "string", "format": "uuid" } } }, "SaveMessageCmd": { "type": "object", "required": [ "channel_id", "message_id" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" } } }, "SavedMessageDto": { "type": "object", "required": [ "id", "channel_id", "message_id", "saved_at" ], "properties": { "channel_id": { "type": "string", "format": "uuid" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": "string", "format": "uuid" }, "saved_at": { "type": "string", "format": "date-time" } } }, "ScriptOutputDto": { "type": "object", "required": [ "exit_code", "stdout", "stderr" ], "properties": { "exit_code": { "type": "integer", "format": "int32" }, "stderr": { "type": "string" }, "stdout": { "type": "string" } } }, "SendMessageCmd": { "type": "object", "properties": { "attachments": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "content": { "type": "string" }, "forwarded_from": { "type": [ "string", "null" ], "format": "uuid" }, "nonce": { "type": [ "string", "null" ], "description": "client-generated idempotency key, unique per room; retrying with the\nsame nonce returns the original message instead of duplicating" }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "thread_broadcast": { "type": "boolean" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" }, "urgent": { "type": "boolean" } } }, "SessionDto": { "type": "object", "required": [ "id", "kind", "last_seen_at", "created_at", "expires_at", "is_revoked", "is_current" ], "properties": { "client_ip_hash": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "device_id": { "type": [ "string", "null" ], "format": "uuid" }, "expires_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_current": { "type": "boolean" }, "is_revoked": { "type": "boolean" }, "kind": { "$ref": "#/components/schemas/SessionKind" }, "last_seen_at": { "type": "string", "format": "date-time" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent_hash": { "type": [ "string", "null" ] } } }, "SessionKind": { "type": "string", "enum": [ "WebLogin", "BearerAccess" ] }, "SetCleanupVisibilityCmd": { "type": "object", "required": [ "is_private" ], "properties": { "is_private": { "type": "boolean" } } }, "SetCommitStatusCmd": { "type": "object", "required": [ "sha", "state", "context" ], "properties": { "context": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "sha": { "type": "string" }, "state": { "$ref": "#/components/schemas/CommitStatusDtoState" }, "target_url": { "type": [ "string", "null" ] } } }, "SetMemberRoleBody": { "type": "object", "required": [ "role" ], "properties": { "expected_version": { "type": "integer", "format": "int32" }, "role": { "$ref": "#/components/schemas/SpaceMemberRole" } } }, "SetOverwriteCmd": { "type": "object", "required": [ "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" } } }, "SetPresenceCmd": { "type": "object", "required": [ "status" ], "properties": { "activities": {}, "status": { "$ref": "#/components/schemas/PresenceStatus" } } }, "SetRepoArchivedCmd": { "type": "object", "required": [ "archived" ], "properties": { "archived": { "type": "boolean" } } }, "SetRolePermissionsBody": { "type": "object", "properties": { "permissions": { "type": "array", "items": { "$ref": "#/components/schemas/PermissionGrant" } } } }, "SignatureDto": { "type": "object", "required": [ "name", "email", "when" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "when": { "type": "string", "format": "date-time" } } }, "SortOrder": { "type": "string", "enum": [ "asc", "desc" ] }, "SpaceDto": { "type": "object", "required": [ "id", "lower_name", "name", "is_private", "is_active", "allow_join", "allow_invite", "members_count", "allow_join_level", "member_must_enable_2fa", "created_at", "updated_at" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "allow_join_level": { "$ref": "#/components/schemas/AllowJoinLevel" }, "avatar_url": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "lower_name": { "type": "string" }, "member_must_enable_2fa": { "type": "boolean" }, "members_count": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "updated_at": { "type": "string", "format": "date-time" }, "welcome_message": { "type": [ "string", "null" ] }, "welcome_object": { "type": [ "string", "null" ], "format": "uuid" } } }, "SpaceImageDto": { "type": "object", "required": [ "space_id", "kind", "url", "format", "bytes", "updated_at" ], "properties": { "bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "format": { "$ref": "#/components/schemas/AvatarFormat" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "kind": { "$ref": "#/components/schemas/SpaceImageKind" }, "space_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "SpaceImageKind": { "type": "string", "enum": [ "avatar", "banner", "invite_banner", "embed_splash" ] }, "SpaceImageUploadQuery": { "type": "object", "description": "Banner geometry is recorded, not inferred: the browser knows the intrinsic\nsize for free, the server would have to decode the image to learn it.", "properties": { "height": { "type": [ "integer", "null" ], "format": "int32" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "SpaceInvitePath": { "type": "object", "required": [ "space_name", "invite_id" ], "properties": { "invite_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "SpaceJoinMethod": { "type": "string", "enum": [ "direct", "invite_link", "invite_targeted", "invite_email" ] }, "SpaceJoinPolicy": { "type": "string", "enum": [ "open", "approval", "invite_only", "private" ] }, "SpaceJoinRequestState": { "type": "string", "enum": [ "pending", "approved", "rejected", "withdrawn" ] }, "SpaceJoinTrigger": { "type": "string", "enum": [ "issue_reaction", "issue_comment_reaction" ] }, "SpaceMemberPath": { "type": "object", "required": [ "space_name", "member_id" ], "properties": { "member_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "SpaceMemberRole": { "type": "string", "enum": [ "member", "admin", "owner" ] }, "SpacePath": { "type": "object", "required": [ "space_name" ], "properties": { "space_name": { "type": "string" } } }, "SpaceReadStates": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ReadStateDto" } } } }, "SpaceRolePath": { "type": "object", "required": [ "space_name", "role_id" ], "properties": { "role_id": { "type": "string", "format": "uuid" }, "space_name": { "type": "string" } } }, "SpaceStatus": { "type": "string", "enum": [ "active", "suspended", "archived" ] }, "SshKeyAddRequest": { "type": "object", "required": [ "name", "public_key" ], "properties": { "description": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "public_key": { "type": "string" } } }, "SshKeyAlgorithm": { "type": "string", "enum": [ "rsa", "ed25519", "ecdsa" ] }, "SshKeySummary": { "type": "object", "required": [ "id", "name", "algorithm", "fingerprint", "public_key", "created_at" ], "properties": { "algorithm": { "$ref": "#/components/schemas/SshKeyAlgorithm" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "fingerprint": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "public_key": { "type": "string" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "StargazerDto": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "starred_at" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "starred_at": { "type": "string", "format": "date-time" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "StopwatchDto": { "type": "object", "required": [ "running", "issue_id" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": [ "string", "null" ], "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "running": { "type": "boolean" }, "started_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "StopwatchPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "SubmitReviewCmd": { "type": "object", "required": [ "state" ], "properties": { "body": { "type": [ "string", "null" ] }, "comments": { "type": "array", "items": { "$ref": "#/components/schemas/InlineDraft" } }, "state": { "$ref": "#/components/schemas/ReviewIntent" } } }, "SubmoduleDto": { "type": "object", "required": [ "path", "url" ], "properties": { "branch": { "type": [ "string", "null" ] }, "commit_sha": { "type": [ "string", "null" ] }, "path": { "type": "string" }, "url": { "type": "string" } } }, "SuspensionDto": { "type": "object", "required": [ "id", "suspension_type", "starts_at", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": [ "string", "null" ] }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "starts_at": { "type": "string", "format": "date-time" }, "suspension_type": { "$ref": "#/components/schemas/SuspensionType" } } }, "SuspensionType": { "type": "string", "enum": [ "temporary", "permanent" ] }, "TagDto": { "type": "object", "required": [ "name", "tag_type", "target_sha" ], "properties": { "created_at": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "tag_type": { "$ref": "#/components/schemas/TagType" }, "tagger_email": { "type": [ "string", "null" ] }, "tagger_name": { "type": [ "string", "null" ] }, "target_sha": { "type": "string" } } }, "TagPolicyDto": { "type": "object", "required": [ "id", "repo_id", "name_pattern", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name_pattern": { "type": "string" }, "repo_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "TagType": { "type": "string", "enum": [ "Lightweight", "Annotated" ] }, "TagWhitelistDto": { "type": "object", "required": [ "policy_id", "user_id" ], "properties": { "policy_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "ThreadDto": { "type": "object", "required": [ "id", "room_id", "root_message_id", "owner_id", "reply_count", "participant_count", "archived", "locked", "created_at", "updated_at" ], "properties": { "archived": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "last_reply_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_reply_id": { "type": [ "string", "null" ], "format": "uuid" }, "locked": { "type": "boolean" }, "name": { "type": [ "string", "null" ] }, "owner": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "owner_id": { "type": "integer", "format": "int64" }, "participant_count": { "type": "integer", "format": "int64" }, "reply_count": { "type": "integer", "format": "int64" }, "room_id": { "type": "string", "format": "uuid" }, "root_message_id": { "type": "string", "format": "uuid" }, "updated_at": { "type": "string", "format": "date-time" } } }, "ThreadMemberCmd": { "type": "object", "properties": { "notify_level": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ThreadNotifyLevel" } ] } } }, "ThreadNotifyLevel": { "type": "string", "enum": [ "None", "All" ] }, "TopicDto": { "type": "object", "required": [ "id", "name", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "updated_at": { "type": "string", "format": "date-time" } } }, "TopicRepoDto": { "type": "object", "required": [ "repo_id", "repo_name", "space_name", "is_private" ], "properties": { "is_private": { "type": "boolean" }, "repo_id": { "type": "string", "format": "uuid" }, "repo_name": { "type": "string" }, "space_name": { "type": "string" } } }, "TotpCodeCmd": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string" } } }, "TotpEnableCmd": { "type": "object", "required": [ "code", "password" ], "properties": { "code": { "type": "string" }, "password": { "type": "string" } } }, "TotpSetupResp": { "type": "object", "required": [ "secret", "otpauth_uri" ], "properties": { "otpauth_uri": { "type": "string" }, "secret": { "type": "string" } } }, "TotpStatusResp": { "type": "object", "required": [ "enabled" ], "properties": { "enabled": { "type": "boolean" } } }, "TrackedTimeDto": { "type": "object", "required": [ "id", "issue_id", "seconds", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string", "format": "uuid" }, "seconds": { "type": "integer", "format": "int64" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "TrackedTimeIdPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id", "time_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" }, "time_id": { "type": "string", "format": "uuid" } } }, "TrackedTimePath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "TransferBody": { "type": "object", "required": [ "target_user_id" ], "properties": { "target_user_id": { "type": "integer", "format": "int64" } } }, "TreeView": { "type": "string", "enum": [ "entries", "last_updated" ] }, "UnreadCountResp": { "type": "object", "required": [ "count" ], "properties": { "count": { "type": "integer", "format": "int64", "minimum": 0 } } }, "UpdateBanBody": { "type": "object", "description": "封禁更新:原因、到期时间与四个放行位。缺失表示不变,null 表示清空。", "properties": { "allow_agent_join": { "type": [ "boolean", "null" ] }, "allow_comment_any": { "type": [ "boolean", "null" ] }, "allow_push_repo": { "type": [ "boolean", "null" ] }, "allow_speak": { "type": [ "boolean", "null" ] }, "expires_at": { "type": [ "string", "null" ], "format": "date-time" }, "reason": { "type": [ "string", "null" ] } } }, "UpdateBoardCmd": { "type": "object", "properties": { "description": { "type": [ "string", "null" ] }, "icon": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] }, "prefix": { "type": [ "string", "null" ] } } }, "UpdateBookmarkCmd": { "type": "object", "properties": { "emoji": { "type": [ "string", "null" ] }, "position": { "type": [ "integer", "null" ], "format": "int64" }, "title": { "type": [ "string", "null" ] }, "url": { "type": [ "string", "null" ] } } }, "UpdateBranchDto": { "type": "object", "required": [ "pull", "result" ], "properties": { "pull": { "$ref": "#/components/schemas/PullDto" }, "result": { "$ref": "#/components/schemas/MergeResultDto" } } }, "UpdateBranchPolicyCmd": { "type": "object", "description": "分支保护策略的更新请求(三态字段语义与其它 PATCH 一致)。", "properties": { "block_on_change_requested_reviews": { "type": [ "boolean", "null" ] }, "block_on_outdated_branch": { "type": [ "boolean", "null" ] }, "block_on_rejected_reviews": { "type": [ "boolean", "null" ] }, "branch_pattern": { "type": [ "string", "null" ] }, "dismiss_stale_approvals": { "type": [ "boolean", "null" ] }, "enable_approvals_whitelist": { "type": [ "boolean", "null" ] }, "enable_force_push": { "type": [ "boolean", "null" ] }, "enable_merge_whitelist": { "type": [ "boolean", "null" ] }, "enable_push": { "type": [ "boolean", "null" ] }, "enable_push_whitelist": { "type": [ "boolean", "null" ] }, "protected_file_patterns": { "type": [ "string", "null" ] }, "require_signed_commits": { "type": [ "boolean", "null" ] }, "required_approvals": { "type": [ "integer", "null" ], "format": "int32" }, "required_status_contexts": { "type": [ "string", "null" ] }, "unprotected_file_patterns": { "type": [ "string", "null" ] } } }, "UpdateCodeCommentCmd": { "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string" } } }, "UpdateCommentCmd": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" } } }, "UpdateDirCmd": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "UpdateGroupCmd": { "type": "object", "properties": { "color": { "type": [ "string", "null" ] }, "icon_hash": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] }, "permissions": { "type": [ "array", "null" ], "items": { "type": "string" } }, "position": { "type": [ "integer", "null" ], "format": "int64" }, "unicode_emoji": { "type": [ "string", "null" ] } } }, "UpdateIssueCmd": { "type": "object", "properties": { "assignee_ids": { "type": [ "array", "null" ], "items": { "type": "integer", "format": "int64" } }, "content": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "label_ids": { "type": [ "array", "null" ], "items": { "type": "string", "format": "uuid" } }, "milestone_id": { "type": [ "string", "null" ], "format": "uuid" }, "priority": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/IssuePriority" } ] }, "title": { "type": [ "string", "null" ] } } }, "UpdateIssueUserCmd": { "type": "object", "properties": { "is_read": { "type": [ "boolean", "null" ] } } }, "UpdateJoinRuleCmd": { "type": "object", "properties": { "enabled": { "type": [ "boolean", "null" ] }, "matcher": { "type": [ "string", "null" ] } } }, "UpdateLabelCmd": { "type": "object", "properties": { "color": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "exclusive": { "type": [ "boolean", "null" ] }, "exclusive_order": { "type": [ "integer", "null" ], "format": "int32" }, "is_archived": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "UpdateMemberBody": { "type": "object", "description": "会籍更新:管理端可改别名、通知偏好、免打扰与封禁附加信息。\n所有字段缺失表示不变,显式 null 表示清空(仅限 Option 字段)。", "properties": { "alias_avatar_url": { "type": [ "string", "null" ] }, "alias_name": { "type": [ "string", "null" ] }, "expected_version": { "type": "integer", "format": "int32" }, "hide_muted_channels": { "type": [ "boolean", "null" ] }, "message_notifications": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MessageNotifications" } ] }, "mobile_push": { "type": [ "boolean", "null" ] }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "muted": { "type": [ "boolean", "null" ] }, "suppress_everyone": { "type": [ "boolean", "null" ] }, "suppress_roles": { "type": [ "boolean", "null" ] } } }, "UpdateMessageCmd": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" } } }, "UpdateMilestoneCmd": { "type": "object", "properties": { "description": { "type": [ "string", "null" ] }, "due_at": { "type": [ "string", "null" ], "format": "date-time" }, "is_closed": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "UpdateOrganizationBody": { "type": "object", "properties": { "allow_invite": { "type": [ "boolean", "null" ] }, "allow_join": { "type": [ "boolean", "null" ] }, "allow_join_level": { "type": [ "integer", "null" ], "format": "int32" }, "avatar_url": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "expected_version": { "type": "integer", "format": "int32" }, "join_policy": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SpaceJoinPolicy" } ] }, "member_must_enable_2fa": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] }, "require_email_verified": { "type": [ "boolean", "null" ] }, "require_mfa": { "type": [ "boolean", "null" ] }, "welcome_message": { "type": [ "string", "null" ] } } }, "UpdateOutboundWebhookCmd": { "type": "object", "properties": { "disabled": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] }, "url": { "type": [ "string", "null" ] } } }, "UpdatePinCmd": { "type": "object", "required": [ "pin_order" ], "properties": { "pin_order": { "type": "integer", "format": "int32" } } }, "UpdatePreferencesCmd": { "type": "object", "properties": { "allow_dms_from": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Audience" } ] }, "allow_mentions_from": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Audience" } ] }, "board_view_mode": { "type": [ "string", "null" ] }, "diff_view_style": { "type": [ "string", "null" ] }, "email_digest": { "type": [ "boolean", "null" ] }, "email_flags": { "type": [ "integer", "null" ], "format": "int32" }, "in_app_flags": { "type": [ "integer", "null" ], "format": "int32" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time", "description": "三态:缺省不动、`null` 清除、给值设置(与 `lib/webapi/src/openapi.rs`\n声明的 PATCH 语义一致)。" }, "push_flags": { "type": [ "integer", "null" ], "format": "int32" }, "show_online_status": { "type": [ "boolean", "null" ] }, "theme_mode": { "type": [ "string", "null" ] } } }, "UpdateProfileCmd": { "type": "object", "properties": { "bio": { "type": [ "string", "null" ] }, "company": { "type": [ "string", "null" ] }, "date_of_birth": { "type": [ "string", "null" ], "format": "date" }, "display_name": { "type": [ "string", "null" ] }, "language": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "location": { "type": [ "string", "null" ] }, "pronouns": { "type": [ "string", "null" ] }, "real_name": { "type": [ "string", "null" ] }, "show_activity": { "type": [ "boolean", "null" ] }, "show_email": { "type": [ "boolean", "null" ] }, "show_location": { "type": [ "boolean", "null" ] }, "show_real_name": { "type": [ "boolean", "null" ] }, "timezone": { "type": [ "string", "null" ] }, "visibility": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProfileVisibility" } ] }, "website": { "type": [ "string", "null" ] } } }, "UpdatePullCmd": { "type": "object", "properties": { "auto_merge": { "type": [ "boolean", "null" ] }, "base_branch": { "type": [ "string", "null" ] }, "body": { "type": [ "string", "null" ] }, "draft": { "type": [ "boolean", "null" ] }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "title": { "type": [ "string", "null" ] } } }, "UpdatePullCommentCmd": { "type": "object", "required": [ "body" ], "properties": { "body": { "type": "string" } } }, "UpdateRefResultDto": { "type": "object", "required": [ "name", "new_oid", "protected" ], "properties": { "name": { "type": "string" }, "new_oid": { "type": "string" }, "old_oid": { "type": [ "string", "null" ] }, "protected": { "type": "boolean" } } }, "UpdateReleaseCmd": { "type": "object", "properties": { "content": { "type": [ "string", "null" ] }, "is_draft": { "type": [ "boolean", "null" ] }, "is_prerelease": { "type": [ "boolean", "null" ] }, "title": { "type": [ "string", "null" ] } } }, "UpdateReminderCmd": { "type": "object", "properties": { "note": { "type": [ "string", "null" ] }, "remind_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "UpdateRepoCmd": { "type": "object", "properties": { "allow_pull_requests": { "type": [ "boolean", "null" ] }, "default_branch": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "enable_lfs": { "type": [ "boolean", "null" ] }, "is_private": { "type": [ "boolean", "null" ] }, "tab_order": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "中间页签顺序;传空数组恢复默认顺序。" }, "website": { "type": [ "string", "null" ] } } }, "UpdateRoleBody": { "type": "object", "properties": { "default_role": { "type": [ "boolean", "null" ] }, "description": { "type": [ "string", "null" ] }, "expected_version": { "type": "integer", "format": "int32" }, "name": { "type": [ "string", "null" ] }, "rank": { "type": [ "integer", "null" ], "format": "int32" }, "self_assignable": { "type": [ "boolean", "null" ] } } }, "UpdateRoomCmd": { "type": "object", "properties": { "is_private": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] }, "nsfw": { "type": [ "boolean", "null" ] }, "parent_id": { "type": [ "string", "null" ], "format": "uuid", "description": "Move the room under another directory node of the same space; `null` puts\nit back at the space root. Absent means \"leave the parent alone\"." }, "position": { "type": [ "integer", "null" ], "format": "int64" }, "rate_limit_per_user": { "type": [ "integer", "null" ], "format": "int32" }, "topic": { "type": [ "string", "null" ] } } }, "UpdateRoomSettingCmd": { "type": "object", "properties": { "favorite": { "type": [ "boolean", "null" ] }, "hidden": { "type": [ "boolean", "null" ] }, "mute_minutes": { "type": [ "integer", "null" ], "format": "int64" }, "muted": { "type": [ "boolean", "null" ] }, "notification_level": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RoomNotificationLevel" } ] } } }, "UpdateTagPolicyCmd": { "type": "object", "properties": { "name_pattern": { "type": [ "string", "null" ] } } }, "UpdateThreadCmd": { "type": "object", "properties": { "archived": { "type": [ "boolean", "null" ] }, "locked": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "UpdateTrackedTimeCmd": { "type": "object", "required": [ "seconds" ], "properties": { "seconds": { "type": "integer", "format": "int64" } } }, "UpdateUsernameCmd": { "type": "object", "required": [ "username" ], "properties": { "username": { "type": "string" } } }, "UpdateWebhookCmd": { "type": "object", "properties": { "disabled": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "UploadEmojiCmd": { "type": "object", "required": [ "name", "content_type", "data_base64" ], "properties": { "animated": { "type": "boolean" }, "content_type": { "type": "string" }, "data_base64": { "type": "string" }, "name": { "type": "string" } } }, "UploadIntentDto": { "type": "object", "required": [ "id", "upload_url", "expires_secs" ], "properties": { "expires_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "id": { "type": "string", "format": "uuid" }, "upload_url": { "type": "string" } } }, "UpsertDraftCmd": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "UpsertLicenseCmd": { "type": "object", "required": [ "display_name", "body" ], "properties": { "body": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": "string" }, "url": { "type": [ "string", "null" ] } } }, "UpsertMemeCmd": { "type": "object", "required": [ "name", "content_type", "url", "size" ], "properties": { "content_type": { "type": "string" }, "height": { "type": [ "integer", "null" ], "format": "int32" }, "name": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "url": { "type": "string" }, "width": { "type": [ "integer", "null" ], "format": "int32" } } }, "UpsertPushCmd": { "type": "object", "required": [ "endpoint", "p256dh_key", "auth_key", "platform" ], "properties": { "auth_key": { "type": "string" }, "endpoint": { "type": "string" }, "p256dh_key": { "type": "string" }, "platform": { "$ref": "#/components/schemas/PushSubscriptionPlatform" }, "user_agent": { "type": [ "string", "null" ] } } }, "UpsertWatchCmd": { "type": "object", "required": [ "mode" ], "properties": { "mode": { "$ref": "#/components/schemas/WatchMode" } } }, "UserDto": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "UserLoginRequest": { "type": "object", "required": [ "identity", "password_hash", "pow_payload" ], "properties": { "identity": { "type": "string" }, "password_hash": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" } } }, "UserLoginResponse": { "type": "object", "required": [ "user_id", "username", "mfa_required" ], "properties": { "challenge": { "type": [ "string", "null" ] }, "displayname": { "type": [ "string", "null" ] }, "mfa_required": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "UserMeDto": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "is_active", "is_restricted", "prohibit_login", "visibility", "bot", "system", "created_at" ], "properties": { "avatar_url": { "type": "string" }, "bot": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "is_restricted": { "type": "boolean" }, "language": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "prohibit_login": { "type": "boolean" }, "system": { "type": "boolean" }, "timezone": { "type": [ "string", "null" ] }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" } } }, "UserOverwriteDto": { "type": "object", "required": [ "dir_id", "user_id", "allow_mask", "deny_mask" ], "properties": { "allow_mask": { "type": "integer", "format": "int64" }, "deny_mask": { "type": "integer", "format": "int64" }, "dir_id": { "type": "string", "format": "uuid" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] }, "user_id": { "type": "integer", "format": "int64" } } }, "UserPreferencesDto": { "type": "object", "required": [ "theme_mode", "board_view_mode", "in_app_flags", "email_flags", "push_flags", "email_digest", "allow_dms_from", "allow_mentions_from", "show_online_status" ], "properties": { "allow_dms_from": { "$ref": "#/components/schemas/Audience" }, "allow_mentions_from": { "$ref": "#/components/schemas/Audience" }, "board_view_mode": { "type": "string", "description": "Default view for the 问题集 page: `board` or `list`." }, "diff_view_style": { "type": [ "string", "null" ] }, "email_digest": { "type": "boolean" }, "email_flags": { "type": "integer", "format": "int32" }, "in_app_flags": { "type": "integer", "format": "int32" }, "mute_until": { "type": [ "string", "null" ], "format": "date-time" }, "push_flags": { "type": "integer", "format": "int32" }, "show_online_status": { "type": "boolean" }, "theme_mode": { "type": "string" } } }, "UserPublic": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "UserRegisterRequest": { "type": "object", "required": [ "username", "birth_date", "email", "password_hash", "email_code", "pow_payload" ], "properties": { "birth_date": { "type": "string" }, "displayname": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "email_code": { "type": "string" }, "password_hash": { "type": "string" }, "pow_payload": { "$ref": "#/components/schemas/PowProofRequest" }, "username": { "type": "string" } } }, "UserRegisterResponse": { "type": "object", "required": [ "user_id", "username" ], "properties": { "displayname": { "type": [ "string", "null" ] }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" } } }, "UserReportDto": { "type": "object", "required": [ "id", "reported_id", "reason", "status", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "evidence": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": "string" }, "reported_id": { "type": "integer", "format": "int64" }, "resolution_note": { "type": [ "string", "null" ] }, "status": { "$ref": "#/components/schemas/ReportStatus" }, "updated_at": { "type": "string", "format": "date-time" } } }, "Value": {}, "VerifyResultDto": { "type": "object", "required": [ "signed", "valid" ], "properties": { "error_message": { "type": [ "string", "null" ] }, "key_id": { "type": [ "string", "null" ] }, "signed": { "type": "boolean" }, "signer": { "type": [ "string", "null" ] }, "valid": { "type": "boolean" } } }, "VoiceConfigDto": { "type": "object", "required": [ "enabled", "url", "recording_enabled" ], "properties": { "enabled": { "type": "boolean" }, "recording_enabled": { "type": "boolean" }, "url": { "type": "string" } } }, "VoiceHandsDto": { "type": "object", "required": [ "hands", "can_moderate" ], "properties": { "can_moderate": { "type": "boolean" }, "hands": { "type": "array", "items": { "$ref": "#/components/schemas/HandDto" } }, "my_state": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/HandState" } ] } } }, "VoiceLayoutDto": { "type": "object", "properties": { "tiles": { "type": "object", "description": "key 为参与者用户 id。", "additionalProperties": { "$ref": "#/components/schemas/VoiceTileDto" }, "propertyNames": { "type": "string" } } } }, "VoiceLayoutPatchDto": { "type": "object", "description": "布局写入是**按 key 合并**的补丁而不是整表替换:每个客户端只提交自己刚拖的\n那一格,收回的格子里列在 `removed`,两个人同时摆不同窗口互不吞没。", "properties": { "removed": { "type": "array", "items": { "type": "string" }, "description": "需要收回自动网格的窗口 key。" }, "tiles": { "type": "object", "description": "需要新增或覆盖的窗口(key = 参与者用户 id)。", "additionalProperties": { "$ref": "#/components/schemas/VoiceTileDto" }, "propertyNames": { "type": "string" } } } }, "VoiceLayoutSavedDto": { "type": "object", "description": "本次写入的服务端时刻,客户端用它给本地副本盖戳。", "required": [ "updated_at" ], "properties": { "updated_at": { "type": "integer", "format": "int64" } } }, "VoiceModerationDto": { "type": "object", "required": [ "ok", "action", "user_id" ], "properties": { "action": { "type": "string" }, "ok": { "type": "boolean" }, "user_id": { "type": "integer", "format": "int64" } } }, "VoiceParticipantDto": { "type": "object", "description": "房间参与者快照。\n\n权威来源是 LiveKit 的 list_participants,Redis 只补主持人静音等本地状态;\n这是「谁在这个频道里」的服务端视图,用于侧栏人数与未加入时的预览。\n会中界面的发言高亮、静音图标与画面轨道一律直接读浏览器里的 Room,\n因为本接口不是事件流,返回值天然是快照。", "required": [ "user_id", "display_name", "joined_at", "can_publish", "moderator_muted", "speaking", "tracks" ], "properties": { "avatar_url": { "type": [ "string", "null" ] }, "can_publish": { "type": "boolean" }, "display_name": { "type": "string" }, "joined_at": { "type": "integer", "format": "int64" }, "moderator_muted": { "type": "boolean" }, "speaking": { "type": "boolean", "description": "快照值:list_participants 不返回发言状态,因此这里恒为 false;\n实时发言指示由前端从 Room 的 activeSpeakers 读取。" }, "tracks": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceTrackDto" } }, "user_id": { "type": "integer", "format": "int64" } } }, "VoiceRecordingDto": { "type": "object", "required": [ "egress_id", "active" ], "properties": { "active": { "type": "boolean" }, "egress_id": { "type": "string" } } }, "VoiceRoomStateDto": { "type": "object", "required": [ "room_id", "count" ], "properties": { "count": { "type": "integer", "format": "int32", "minimum": 0 }, "room_id": { "type": "string", "format": "uuid" } } }, "VoiceSpaceStatesDto": { "type": "object", "required": [ "rooms" ], "properties": { "rooms": { "type": "array", "items": { "$ref": "#/components/schemas/VoiceRoomStateDto" } } } }, "VoiceTileDto": { "type": "object", "description": "一个参与者窗口在画布里的摆位,坐标按画布宽高归一化(0~1),\n这样不同分辨率、不同窗口大小的成员看到的是同一套布局。", "required": [ "x", "y", "w" ], "properties": { "h": { "type": [ "number", "null" ], "format": "double", "description": "归一化高度,和 `w` 一样按画布的可用宽高分别归一,因此窗口可以自由\n拉伸而不是只能等比缩放。旧记录没有这个字段,读出来是 `None`,客户端\n按宽度的 3/4 补一个经典比例。" }, "updated_at": { "type": "integer", "format": "int64", "description": "服务端写入时刻(秒)。请求里被忽略,响应里供客户端判断“谁更新”,\n这样并发拖拽时一个迟到的 GET 不会把刚摆好的窗口拽回旧位置。" }, "w": { "type": "number", "format": "double", "description": "归一化宽度。" }, "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" } } }, "VoiceTokenDto": { "type": "object", "required": [ "token", "url", "room_name", "expires_in_secs", "can_publish", "is_stage" ], "properties": { "can_publish": { "type": "boolean" }, "expires_in_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "hand_state": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/HandState" } ] }, "is_stage": { "type": "boolean" }, "room_name": { "type": "string" }, "token": { "type": "string" }, "url": { "type": "string" } } }, "VoiceTrackDto": { "type": "object", "required": [ "sid", "kind", "source", "muted" ], "properties": { "kind": { "type": "string" }, "muted": { "type": "boolean" }, "sid": { "type": "string" }, "source": { "type": "string" } } }, "WatchDto": { "type": "object", "required": [ "id", "mode", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "issue_id": { "type": [ "string", "null" ], "format": "uuid" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" }, "user": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/UserDto" } ] } } }, "WatchMode": { "type": "string", "enum": [ "unwatched", "watching", "ignore" ] }, "WatchPath": { "type": "object", "required": [ "space_name", "board_id", "issue_id" ], "properties": { "board_id": { "type": "string", "format": "uuid" }, "issue_id": { "type": "string" }, "space_name": { "type": "string" } } }, "WatcherDto": { "type": "object", "required": [ "user_id", "username", "display_name", "avatar_url", "mode", "watching_since" ], "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "mode": { "$ref": "#/components/schemas/WatchMode" }, "user_id": { "type": "integer", "format": "int64" }, "username": { "type": "string" }, "watching_since": { "type": "string", "format": "date-time" } } }, "WebhookDto": { "type": "object", "required": [ "id", "room_id", "name", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "last_used_at": { "type": [ "string", "null" ], "format": "date-time" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" } } }, "WebhookPostCmd": { "type": "object", "properties": { "content": { "type": "string" }, "nonce": { "type": [ "string", "null" ] }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "WebhookSecretDto": { "type": "object", "required": [ "id", "room_id", "name", "token", "disabled", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "disabled": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "room_id": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } }, "WhitelistKind": { "type": "string", "enum": [ "Push", "Merge", "Approval" ] }, "WriteBlobBody": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "string" } } }, "WriteObjectResultDto": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string" } } }, "WriteTreeBody": { "type": "object", "required": [ "files" ], "properties": { "files": { "type": "array", "items": { "$ref": "#/components/schemas/FileEntryDto" } } } } }, "securitySchemes": { "session_cookie": { "type": "apiKey", "in": "cookie", "name": "session" } } }, "security": [ { "session_cookie": [] } ], "tags": [ { "name": "issues", "description": "Issue management API" }, { "name": "space", "description": "Space management endpoints" } ] }