{"openapi":"3.0.3","info":{"title":"拾页 AI 收藏库","version":"1.0.0","description":"先阅读 /ai。同一已登录浏览器通过 Cookie 免 Token 管理收藏，写请求要求本站 Origin；独立客户端使用 Bearer Token。相同 URL 原子去重，新收藏默认私密。"},"servers":[{"url":"https://save.iring.fun"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"管理员提供的 AI Token，禁止放入 URL。"},"adminSession":{"type":"apiKey","in":"cookie","name":"shelf_session"}},"schemas":{"RetrievalInput":{"type":"object","properties":{"q":{"type":"string","maxLength":200,"description":"用空格分隔关键词，例如 武汉 双休 文员；精确短语请用 terms"},"terms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"minItems":1,"maxItems":6,"description":"最多 6 个词或连续短语，支持中文；不能与 q 同时提供"},"match":{"type":"string","enum":["all","any"],"default":"all","description":"all 要求每个词都命中，可在不同字段；any 任一词命中，适合扩大检索范围"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]},"created_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"created_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"deleted":{"type":"boolean","default":false},"url":{"type":"string","maxLength":4096,"format":"uri","description":"按规范化原网页 URL 精确定位；忽略片段，保留查询参数"},"site":{"type":"string","maxLength":4096,"format":"uri","description":"按网站来源筛选，例如 https://example.com；忽略路径，协议和端口需一致"},"sort":{"type":"string","enum":["relevance","newest"],"default":"relevance","description":"relevance 优先标题和标签命中，再摘要和正文；newest 按收藏时间"},"limit":{"type":"integer","minimum":1,"maximum":30,"default":10,"description":"最多返回 30 条紧凑结果，默认 10；不返回全文或全库统计"},"cursor":{"type":"string","minLength":1,"maxLength":2048,"description":"照抄上一页 next_cursor；改变检索条件后清空 cursor"}},"additionalProperties":false},"RetrievalResult":{"type":"object","required":["items","returned","has_more","next_cursor","query","limit","hints"],"properties":{"items":{"type":"array","items":{"type":"object","required":["id","title","url","tags","visibility","created_at","updated_at","deleted_at","score","summary","matches","detail_url","api_url","read_url"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"tags":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["public","private"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","nullable":true},"score":{"type":"integer","description":"关键词匹配权重，不是相似度概率；newest 或空关键词时为0"},"summary":{"type":"string","description":"紧凑可读摘要，不是全文；媒体来源说明可能增加字符数"},"matches":{"type":"array","items":{"type":"object","required":["field","text","matched_terms"],"properties":{"field":{"type":"string","enum":["title","tags","summary","content"]},"text":{"type":"string","description":"该字段第一个命中词附近的已收藏内容片段；不是自动生成摘要"},"matched_terms":{"type":"array","items":{"type":"string"}}}}},"detail_url":{"type":"string","format":"uri"},"api_url":{"type":"string","format":"uri"},"read_url":{"type":"string","format":"uri"}}}},"returned":{"type":"integer"},"has_more":{"type":"boolean"},"next_cursor":{"type":"string","nullable":true,"description":"照抄为下一次请求的cursor；改变筛选需清空。不是鉴权凭证。"},"query":{"type":"object","description":"实际应用的词、匹配模式和筛选"},"limit":{"type":"integer"},"hints":{"type":"array","items":{"type":"string"}}}},"BookmarkText":{"type":"object","required":["id","title","url","detail_url","section","text","offset","end_offset","total_length","has_more","next_offset","updated_at","empty","hint"],"properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"detail_url":{"type":"string","format":"uri"},"section":{"type":"string","enum":["summary","content","notes"]},"text":{"type":"string"},"offset":{"type":"integer"},"end_offset":{"type":"integer"},"total_length":{"type":"integer"},"has_more":{"type":"boolean"},"next_offset":{"type":"integer","nullable":true},"updated_at":{"type":"string","format":"date-time"},"empty":{"type":"boolean"},"hint":{"type":"string"}}},"Annotation":{"type":"object","properties":{"id":{"type":"string"},"bookmark_id":{"type":"string"},"target":{"type":"string","enum":["summary","content"]},"quote":{"type":"string"},"prefix":{"type":"string"},"suffix":{"type":"string"},"note":{"type":"string"},"start_offset":{"type":"integer","nullable":true},"end_offset":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","bookmark_id","target","quote","prefix","suffix","note","start_offset","end_offset","created_at","updated_at"]},"CreateAnnotation":{"type":"object","properties":{"target":{"type":"string","enum":["summary","content"],"description":"批注对应摘要 summary 或正文 content"},"quote":{"type":"string","minLength":1,"maxLength":5000,"description":"选中的可见原文，保持原样；不含 HTML 标记或 Markdown 语法"},"prefix":{"type":"string","maxLength":64,"default":"","description":"选中文字之前最多 64 个 UTF-16 字符，用于原文变化后的定位"},"suffix":{"type":"string","maxLength":64,"default":"","description":"选中文字之后最多 64 个 UTF-16 字符，用于区分重复片段"},"start_offset":{"type":"integer","minimum":0,"maximum":1000000,"description":"可选：渲染后文本中选段起点，以 UTF-16 字符计数"},"end_offset":{"type":"integer","minimum":1,"maximum":1000000,"description":"可选：选段终点（不包含），与 start_offset 同时提交"},"note":{"type":"string","minLength":1,"maxLength":5000,"description":"私有 Markdown 批注正文"}},"required":["target","quote","note"],"additionalProperties":false},"UpdateAnnotation":{"type":"object","properties":{"note":{"type":"string","minLength":1,"maxLength":5000,"description":"私有 Markdown 批注正文"}},"required":["note"],"additionalProperties":false},"Bookmark":{"type":"object","required":["id","url","title","summary","summary_format","content","content_format","tags","visibility","created_at","updated_at","deleted_at","detail_url","api_url"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"summary":{"type":"string"},"summary_format":{"type":"string","enum":["text","markdown","html"]},"content":{"type":"string"},"content_format":{"type":"string","enum":["markdown","html"],"description":"正文格式"},"tags":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["public","private"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","nullable":true,"format":"date-time"},"detail_url":{"type":"string","format":"uri"},"api_url":{"type":"string","format":"uri"},"notes":{"type":"string","description":"私有 Markdown 笔记，仅管理员和获授权 AI 的详情响应返回"}}},"BookmarkListItem":{"type":"object","required":["id","url","title","summary","summary_format","content_format","tags","visibility","created_at","updated_at","deleted_at","detail_url","api_url","thumbnail"],"properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"title":{"type":"string"},"summary":{"type":"string"},"summary_format":{"type":"string","enum":["text","markdown","html"]},"content_format":{"type":"string","enum":["markdown","html"],"description":"正文格式"},"tags":{"type":"array","items":{"type":"string"}},"visibility":{"type":"string","enum":["public","private"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","nullable":true,"format":"date-time"},"detail_url":{"type":"string","format":"uri"},"api_url":{"type":"string","format":"uri"},"thumbnail":{"type":"object","nullable":true,"required":["src","alt"],"description":"正文第一张有效 HTTPS 图片；无图片时为 null。列表不返回正文或私有笔记。","properties":{"src":{"type":"string","format":"uri"},"alt":{"type":"string"}}}}},"SaveBookmark":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":240},"summary":{"type":"string","maxLength":5000},"summary_format":{"type":"string","enum":["text","markdown","html"],"description":"摘要格式。提供 summary 时省略则为纯文本 text；HTML 富文本和 Markdown 需显式指定。必须与 summary 一起提供。"},"content":{"type":"string","maxLength":200000},"notes":{"type":"string","maxLength":20000,"description":"私有 Markdown 笔记，仅管理员和获授权 AI 可读写，公开页及分享链接不会返回。"},"content_format":{"type":"string","enum":["markdown","html"],"description":"正文格式。提供 content 时省略则按 markdown；富文本 HTML 请同时提供 content_format=html。HTML 会安全净化。"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]}},"required":["url"],"additionalProperties":false},"UpdateBookmark":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"format":"uri"},"title":{"type":"string","minLength":1,"maxLength":240},"summary":{"type":"string","maxLength":5000},"summary_format":{"type":"string","enum":["text","markdown","html"],"description":"摘要格式。提供 summary 时省略则为纯文本 text；HTML 富文本和 Markdown 需显式指定。必须与 summary 一起提供。"},"content":{"type":"string","maxLength":200000},"notes":{"type":"string","maxLength":20000,"description":"私有 Markdown 笔记，仅管理员和获授权 AI 可读写，公开页及分享链接不会返回。"},"content_format":{"type":"string","enum":["markdown","html"],"description":"正文格式。提供 content 时省略则按 markdown；富文本 HTML 请同时提供 content_format=html。HTML 会安全净化。"},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]}},"additionalProperties":false},"ShareFilters":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]},"created_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"created_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"}},"additionalProperties":false},"CreateShare":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"filters":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]},"created_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"created_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"}},"additionalProperties":false},"expires_in_days":{"type":"integer","minimum":1,"maximum":365}},"required":["name","filters"],"additionalProperties":false},"BulkAction":{"anyOf":[{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100},"action":{"type":"string","enum":["public","private","trash","restore","purge"]}},"required":["ids","action"],"additionalProperties":false},{"type":"object","properties":{"filters":{"type":"object","properties":{"q":{"type":"string","maxLength":200},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":40},"maxItems":20},"visibility":{"type":"string","enum":["public","private"]},"created_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"created_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"收藏日期，按北京时间（UTC+8）计算，包含当日"},"deleted":{"type":"boolean","default":false}},"additionalProperties":false},"excluded_ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":20000,"default":[]},"action":{"type":"string","enum":["public","private","trash","restore","purge"]}},"required":["filters","action"],"additionalProperties":false}]},"Share":{"type":"object","required":["id","name","filters","created_at","expires_at","revoked_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"filters":{"$ref":"#/components/schemas/ShareFilters"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","nullable":true,"format":"date-time"},"revoked_at":{"type":"string","nullable":true,"format":"date-time"},"url":{"type":"string","format":"uri"}}},"SearchResult":{"type":"object","required":["items","total","page","limit","pages","tags","counts"],"properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BookmarkListItem"}},"total":{"type":"integer"},"page":{"type":"integer"},"limit":{"type":"integer"},"pages":{"type":"integer"},"tags":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer"}},"required":["name","count"]}},"counts":{"type":"object","properties":{"total":{"type":"integer"},"public":{"type":"integer"},"private":{"type":"integer"}},"required":["total","public","private"]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"paths":{"/ai.json":{"get":{"operationId":"discoverAiCapabilities","summary":"无需凭证的接入清单、检索Schema、分段读取与引用规则；不包含收藏数据","responses":{"200":{"description":"机器可读接入清单","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/search":{"post":{"operationId":"retrieveBookmarks","summary":"推荐AI检索：多词全部/任一匹配、相关性排序、命中片段和游标；Cookie需要同源Origin","security":[{"bearerAuth":[]},{"adminSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalInput"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/RetrievalResult"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/public/search":{"post":{"operationId":"retrievePublicBookmarks","summary":"匿名检索仅公开且未删除的收藏；不能读取私有笔记或批注","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalInput"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/RetrievalResult"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}/text":{"get":{"operationId":"readBookmarkText","summary":"分段读取可读纯文本、媒体说明和原网址；offset/length以UTF-16计数","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"},{"name":"section","in":"query","schema":{"type":"string","enum":["summary","content","notes"],"default":"content","description":"读取摘要、正文或私有整条笔记；文字批注请用 list_annotations"}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":1000000,"default":0,"description":"以 UTF-16 字符计数；照抄 next_offset 可继续读取"}},{"name":"length","in":"query","schema":{"type":"integer","minimum":1,"maximum":12000,"default":6000,"description":"每次最多 12000 字符，默认 6000，避免全文撑满上下文"}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/BookmarkText"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/public/bookmarks/{id}/text":{"get":{"operationId":"readPublicBookmarkText","summary":"匿名分段读取公开收藏；section=notes始终404","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"},{"name":"section","in":"query","schema":{"type":"string","enum":["summary","content","notes"],"default":"content","description":"读取摘要、正文或私有整条笔记；文字批注请用 list_annotations"}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":1000000,"default":0,"description":"以 UTF-16 字符计数；照抄 next_offset 可继续读取"}},{"name":"length","in":"query","schema":{"type":"integer","minimum":1,"maximum":12000,"default":6000,"description":"每次最多 12000 字符，默认 6000，避免全文撑满上下文"}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/BookmarkText"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}/annotations":{"get":{"operationId":"listAnnotations","summary":"读取私有文字批注；公开及分享访问不可用","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Annotation"}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createAnnotation","summary":"为摘要/正文选段添加私有批注；最多 100 条；Cookie 写请求要求本站 Origin","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnnotation"}}}},"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Annotation"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}/annotations/{annotationId}":{"patch":{"operationId":"updateAnnotation","summary":"只修改私有批注内容；保留原文引用","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"},{"name":"annotationId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnnotation"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Annotation"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteAnnotation","summary":"删除私有批注，保留收藏及原文","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"},{"name":"annotationId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/shares":{"get":{"operationId":"listSearchShares","summary":"管理员列出固定检索分享；不返回链接凭证","security":[{"adminSession":[]}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Share"}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSearchShare","summary":"管理员创建条件锁定的只读分享；无有效期参数时长期有效；需要同源 Origin","security":[{"adminSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShare"}}}},"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Share"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/shares/{id}/link":{"get":{"operationId":"recoverShareLink","summary":"管理员再次复制可用分享链接","security":[{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Share"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/shares/{id}":{"delete":{"operationId":"revokeSearchShare","summary":"管理员撤销分享；列表和详情均停止访问；需要同源 Origin","security":[{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/shared/{secret}/bookmarks":{"get":{"operationId":"readSharedSearch","summary":"只读查询固定条件范围，含获授权的私密收藏；仅接受 page/limit，其他参数返回 400","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"},"description":"分享链接中的范围授权凭证，不是 AI Token。"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":12}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"allOf":[{"$ref":"#/components/schemas/SearchResult"},{"type":"object","required":["share"],"properties":{"share":{"$ref":"#/components/schemas/Share"}}}]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/shared/{secret}/bookmarks/{id}":{"get":{"operationId":"readSharedBookmark","summary":"读取分享范围内的完整正文；不能访问范围外或已删除条目；不接受查询参数","security":[],"parameters":[{"name":"secret","in":"path","required":true,"schema":{"type":"string"},"description":"分享链接中的范围授权凭证，不是 AI Token。"},{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/bookmarks/bulk":{"post":{"operationId":"bulkBookmarks","summary":"管理员按明确 ID（最多 100 个）或筛选条件跨页批量公开、私密、移入回收站、恢复或永久删除；永久删除仅限回收站且不可恢复；筛选模式在执行时匹配并排除 excluded_ids，返回实际数量；需要同源 Origin","security":[{"adminSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkAction"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["action","requested","changed","skipped"],"properties":{"action":{"type":"string","enum":["public","private","trash","restore","purge"]},"requested":{"type":"integer"},"changed":{"type":"integer"},"skipped":{"type":"integer"},"ids":{"type":"array","items":{"type":"string"},"description":"仅明确 ID 模式返回实际处理的 ID"}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/me":{"get":{"operationId":"verifyToken","summary":"验证 Token 或管理员会话","security":[{"bearerAuth":[]},{"adminSession":[]}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"kind":{"type":"string","enum":["admin","token"]},"id":{"type":"string"}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks":{"get":{"operationId":"searchBookmarks","summary":"搜索收藏；列表不含正文","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"created_from","in":"query","schema":{"type":"string","format":"date"},"description":"收藏起始日期 YYYY-MM-DD；北京时间 UTC+8，包含当日"},{"name":"created_to","in":"query","schema":{"type":"string","format":"date"},"description":"收藏结束日期 YYYY-MM-DD；北京时间 UTC+8，包含当日；不得早于起始日期"},{"name":"q","in":"query","schema":{"type":"string","maxLength":200},"description":"搜索标题、摘要、正文和标签，支持中文。"},{"name":"tag","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"description":"可重复；所有标签必须匹配。"},{"name":"visibility","in":"query","schema":{"type":"string","enum":["public","private"]}},{"name":"deleted","in":"query","schema":{"type":"boolean","default":false}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":12}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/SearchResult"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"saveBookmark","summary":"按 URL 新建、部分更新或从回收站重新收藏，返回 created/updated/restored","security":[{"bearerAuth":[]},{"adminSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveBookmark"}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["action","bookmark"],"properties":{"action":{"type":"string","enum":["created","updated","restored"]},"bookmark":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}":{"get":{"operationId":"getBookmark","summary":"获取详情与正文","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateBookmark","summary":"仅修改指定字段；tags 整体替换","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBookmark"}}}}},"delete":{"operationId":"deleteBookmark","summary":"移入回收站；重复删除安全","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/bookmarks/{id}/restore":{"post":{"operationId":"restoreBookmark","summary":"恢复回收站收藏；原公开状态保留","security":[{"bearerAuth":[]},{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/public/bookmarks":{"get":{"operationId":"listPublicBookmarks","summary":"匿名查询，仅包含公开且未删除的收藏","parameters":[{"name":"created_from","in":"query","schema":{"type":"string","format":"date"},"description":"收藏起始日期 YYYY-MM-DD；北京时间 UTC+8，包含当日"},{"name":"created_to","in":"query","schema":{"type":"string","format":"date"},"description":"收藏结束日期 YYYY-MM-DD；北京时间 UTC+8，包含当日；不得早于起始日期"},{"name":"q","in":"query","schema":{"type":"string","maxLength":200},"description":"搜索标题、摘要、正文和标签，支持中文。"},{"name":"tag","in":"query","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true,"description":"可重复；所有标签必须匹配。"},{"name":"visibility","in":"query","schema":{"type":"string","enum":["public","private"]}},{"name":"deleted","in":"query","schema":{"type":"boolean","default":false}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":12}}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/SearchResult"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/public/bookmarks/{id}":{"get":{"operationId":"getPublicBookmark","summary":"匿名读取公开收藏","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Bookmark"}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/session":{"get":{"operationId":"sessionStatus","summary":"当前管理员是否已登录","responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"authenticated":{"type":"boolean"}},"required":["authenticated"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"login","summary":"管理员登录；需要同源 Origin 请求头","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["password"],"additionalProperties":false,"properties":{"password":{"type":"string","maxLength":1024}}}}}},"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"logout","summary":"管理员退出；需要同源 Origin","security":[{"adminSession":[]}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/tokens":{"get":{"operationId":"listTokens","summary":"管理员列出凭证元信息；无 Token 原文或摘要","security":[{"adminSession":[]}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","name","created_at","revoked_at"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true}}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createToken","summary":"创建可加密恢复的 AI Token；需要同源 Origin","security":[{"adminSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":80}}}}}},"responses":{"201":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","name","created_at","revoked_at","token","entry_url","mcp_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true},"token":{"type":"string"},"entry_url":{"type":"string"},"mcp_url":{"type":"string"}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/tokens/{id}":{"delete":{"operationId":"revokeToken","summary":"撤销 Token；需要同源 Origin","security":[{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/tokens/{id}/connection":{"get":{"operationId":"tokenConnection","summary":"管理员查看未撤销 Token 的完整接入信息；Bearer Token 无权访问","security":[{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","name","created_at","revoked_at","token","entry_url","mcp_url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true},"token":{"type":"string"},"entry_url":{"type":"string"},"mcp_url":{"type":"string"}}}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/admin/bookmarks/{id}/purge":{"delete":{"operationId":"purgeBookmark","summary":"永久删除回收站条目；仅管理员会话，同源 Origin","security":[{"adminSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"收藏 ID；通过保存或查询获取。"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"]}}}}}},"400":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"错误；根据 error.code 和 hint 修正请求。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}