{"openapi":"3.1.0","info":{"title":"wxmpapi","description":"微信公众号文章与合集解析、库内文章查询，以及微信读书公众号订阅、话题搜索和采集管理。公开解析无需登录；管理接口使用管理密钥，内部调度使用独立密钥。","version":"0.1.0"},"paths":{"/api/v1/management/providers/weread":{"get":{"summary":"账号状态","description":"只读账号状态，不请求 WeRead 或写入账号。\n\nactive 表示凭证已接纳；degraded 表示保留会话但有已记录的异常。\nbusiness_verified 仅在当前凭证已有成功业务请求、且无错误时为 true。\nrefresh 和保活成功不会伪造业务验证；具体时间和原因见\nlast_authenticated_at、last_success_at、last_error_code。","operationId":"get_provider_status_api_v1_management_providers_weread_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"账号状态响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"账号状态响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/providers/weread/overview":{"get":{"summary":"账号、维护与采集运行概览","description":"汇总已保存的账号、维护、保活、采集与订阅记录，不请求WeRead、不写数据库。\n\n时间使用带时区的ISO格式；未初始化记录保持为空，不创建任务或抽样refresh计划。\n这是多次只读查询的近似快照，不保证Cron存活、业务即时可用或计划准点执行。","operationId":"get_runtime_overview_api_v1_management_providers_weread_overview_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuntimeOverview","title":"账号、维护与采集运行概览响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"账号、维护与采集运行概览响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/providers/weread/login-sessions":{"post":{"summary":"创建扫码会话","operationId":"create_login_session_api_v1_management_providers_weread_login_sessions_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"创建扫码会话响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"创建扫码会话响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"请求微信读书；已有可用账号时不用于日常读取"}},"/api/v1/management/providers/weread/installation":{"get":{"summary":"当前设备档案摘要","operationId":"installation_status_api_v1_management_providers_weread_installation_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"当前设备档案摘要响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"当前设备档案摘要响应"}}}}},"tags":["库内文章与运行记录"],"description":"只读数据库，不请求微信读书"}},"/api/v1/management/providers/weread/installation/new":{"post":{"summary":"生成并替换设备指纹","operationId":"new_installation_api_v1_management_providers_weread_installation_new_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewInstallationRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"生成并替换设备指纹响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"生成并替换设备指纹响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"会作废旧会话；必须提交 expected_profile_uid，之后需扫码"}},"/api/v1/management/providers/weread/login-sessions/{login_session_uid}":{"get":{"summary":"查询扫码会话","operationId":"get_login_session_api_v1_management_providers_weread_login_sessions__login_session_uid__get","parameters":[{"name":"login_session_uid","in":"path","required":true,"schema":{"type":"string","title":"扫码会话标识"},"description":"扫码会话标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"查询扫码会话响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"查询扫码会话响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"读取保存状态，可能更新过期标记"}},"/api/v1/management/providers/weread/login-sessions/{login_session_uid}/complete":{"post":{"summary":"完成扫码登录","operationId":"complete_login_session_api_v1_management_providers_weread_login_sessions__login_session_uid__complete_post","parameters":[{"name":"login_session_uid","in":"path","required":true,"schema":{"type":"string","title":"扫码会话标识"},"description":"扫码会话标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"完成扫码登录响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"完成扫码登录响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"请求微信读书 并保存登录凭据"}},"/api/v1/management/providers/weread/logout":{"post":{"summary":"退出当前账号","operationId":"logout_api_v1_management_providers_weread_logout_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"退出当前账号响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"退出当前账号响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"清除当前可用会话，之后需要重新登录"}},"/api/v1/management/providers/weread/health-check":{"post":{"summary":"业务可用性探测","operationId":"health_check_api_v1_management_providers_weread_health_check_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"业务可用性探测响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"业务可用性探测响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"会请求微信读书；服务探活请用 /api/health"}},"/api/v1/management/providers/weread/refresh":{"post":{"summary":"主动续期当前登录","operationId":"refresh_session_api_v1_management_providers_weread_refresh_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"主动续期当前登录响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"主动续期当前登录响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"请求微信读书 并更新凭据；不附加整套保活"}},"/api/v1/management/providers/weread/search":{"get":{"summary":"搜索公众号","operationId":"search_api_v1_management_providers_weread_search_get","parameters":[{"name":"keyword","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"title":"搜索关键词"},"description":"搜索关键词"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":15,"title":"每页条数"},"description":"每页条数"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(app|direct)$","default":"app","title":"处理模式"},"description":"处理模式"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"搜索公众号响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"搜索公众号响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；默认模拟应用的搜索流程，count 默认 15、最多 20"}},"/api/v1/management/providers/weread/identify-article":{"post":{"summary":"从文章链接识别公众号","operationId":"identify_article_api_v1_management_providers_weread_identify_article_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyArticleRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"从文章链接识别公众号响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"从文章链接识别公众号响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；不自动注册"}},"/api/v1/management/providers/weread/books/{book_id}":{"get":{"summary":"公众号阅读信息","operationId":"read_info_api_v1_management_providers_weread_books__book_id__get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"公众号阅读信息响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"公众号阅读信息响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书"}},"/api/v1/management/providers/weread/books/{book_id}/articles":{"get":{"summary":"上游原始文章列表","operationId":"list_articles_api_v1_management_providers_weread_books__book_id__articles_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"分页偏移量"},"description":"分页偏移量"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":20,"title":"每页条数"},"description":"每页条数"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"上游原始文章列表响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"上游原始文章列表响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；不是查询已入库文章"}},"/api/v1/management/providers/weread/search-pages":{"post":{"summary":"分页搜索公众号或话题","operationId":"search_pages_api_v1_management_providers_weread_search_pages_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchPagesRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"分页搜索公众号或话题响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"分页搜索公众号或话题响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；scope=2 公众号，scope=4 话题"}},"/api/v1/management/providers/weread/books/{book_id}/article-pages":{"post":{"summary":"文章分页与可选原文链接","operationId":"article_pages_api_v1_management_providers_weread_books__book_id__article_pages_post","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticlePagesRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"文章分页与可选原文链接响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"文章分页与可选原文链接响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；默认 1 页，不写订阅采集表"}},"/api/v1/management/providers/weread/reviews/{review_id}/url":{"get":{"summary":"获取单篇原文链接","operationId":"review_url_api_v1_management_providers_weread_reviews__review_id__url_get","parameters":[{"name":"review_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书文章标识"},"description":"微信读书文章标识，保持原值，包括其中的 ~ 字符。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"获取单篇原文链接响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"获取单篇原文链接响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书；review_id 保留原值，包括 ~"}},"/api/v1/management/providers/weread/subscriptions":{"post":{"summary":"按 book_id 注册跟踪公众号","operationId":"register_account_api_v1_management_providers_weread_subscriptions_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAccountRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"按 book_id 注册跟踪公众号响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"按 book_id 注册跟踪公众号响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"写数据库；不当场拉取，重复 book_id 不更新"},"get":{"summary":"跟踪公众号及拉取结果","description":"只读订阅列表，默认隐藏软取消记录；历史文章始终保留。","operationId":"registered_accounts_api_v1_management_providers_weread_subscriptions_get","parameters":[{"name":"include_cancelled","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"是否包含已取消订阅"},"description":"设为 true 时一并返回已取消的订阅，不恢复订阅。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"跟踪公众号及拉取结果响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"跟踪公众号及拉取结果响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/providers/weread/subscriptions/{book_id}":{"patch":{"summary":"改名、暂停或恢复订阅","description":"只写订阅设置，不请求WeRead。enabled=true也可恢复已取消订阅，等下一正常时段。\n\n暂停期间仍允许显式手动拉取。采集占用同号锁时返回409 WORK_BUSY。","operationId":"update_subscription_api_v1_management_providers_weread_subscriptions__book_id__patch","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"改名、暂停或恢复订阅响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"改名、暂停或恢复订阅响应"}}}}},"tags":["拉取、时间表与历史补拉"]},"delete":{"summary":"取消订阅，保留历史文章","description":"软取消并返回记录；重复取消幂等。不存在返回404，任务占用返回409。","operationId":"cancel_subscription_api_v1_management_providers_weread_subscriptions__book_id__delete","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"取消订阅，保留历史文章响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"取消订阅，保留历史文章响应"}}}}},"tags":["拉取、时间表与历史补拉"]}},"/api/v1/management/providers/weread/subscriptions/{book_id}/pull":{"post":{"summary":"手动拉取一个已跟踪公众号","operationId":"pull_account_api_v1_management_providers_weread_subscriptions__book_id__pull_post","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullAccountRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"手动拉取一个已跟踪公众号响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"手动拉取一个已跟踪公众号响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"请求微信读书 并入库；parse=true 才额外抓取正文"}},"/api/v1/management/providers/weread/subscriptions/{book_id}/articles":{"get":{"summary":"已入库文章与原文链接","operationId":"discovered_articles_api_v1_management_providers_weread_subscriptions__book_id__articles_get","parameters":[{"name":"book_id","in":"path","required":true,"schema":{"type":"string","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"返回数量上限"},"description":"返回数量上限"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"已入库文章与原文链接响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"已入库文章与原文链接响应"}}}}},"tags":["库内文章与运行记录"],"description":"只读数据库；limit 默认 100，最多 500"}},"/api/v1/management/providers/weread/maintenance":{"post":{"summary":"按计划执行周期维护","operationId":"maintain_session_api_v1_management_providers_weread_maintenance_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"按计划执行周期维护响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"按计划执行周期维护响应"}}}}},"tags":["扫码、账号与保活管理"],"description":"到期时续期并保活；有持久检查点"}},"/api/v1/management/providers/weread/pull-settings":{"get":{"summary":"读取拉取时间表和开关","operationId":"get_pull_settings_api_v1_management_providers_weread_pull_settings_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"读取拉取时间表和开关响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"读取拉取时间表和开关响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"只读数据库与配置；runtime_enabled 为运行总开关"},"put":{"summary":"保存完整拉取设置","operationId":"put_pull_settings_api_v1_management_providers_weread_pull_settings_put","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullSettings"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"保存完整拉取设置响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"保存完整拉取设置响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"写数据库；不立即执行拉取"}},"/api/v1/management/providers/weread/pull-round":{"get":{"summary":"当前或最近批次结果","operationId":"get_pull_round_api_v1_management_providers_weread_pull_round_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"当前或最近批次结果响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"当前或最近批次结果响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"只读数据库；查看 results、pending、next_run_at"}},"/api/v1/management/providers/weread/topic-searches":{"post":{"summary":"搜索话题文章，可选解析和保存正文","description":"搜索/兑链使用WeRead；parse=true后仅通过微信原文链接解析，save=true显式入库。\n\n默认不解析、不保存正文。content报告正文阶段结果，不覆盖搜索partial/stop_reason。\nGET结果只返回处理摘要；正文随本次POST返回，保存后可按article_id读取。\n正文失败项diagnostics区分获取/解析/保存阶段，保留安全原因分类及可用HTTP状态；\nmessage/suggestion提供中文说明和建议，包括作者隐私、平台限制、发布者删除及保存故障。","operationId":"topic_search_api_v1_management_providers_weread_topic_searches_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicSearchRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"搜索话题文章，可选解析和保存正文响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"搜索话题文章，可选解析和保存正文响应"}}}}},"tags":["公众号发现、注册与话题搜索"]}},"/api/v1/management/providers/weread/topic-searches/{uid}":{"get":{"summary":"已保存的话题搜索结果","description":"只读已存搜索及正文处理摘要，不重新搜索、解析或补存正文。","operationId":"topic_search_result_api_v1_management_providers_weread_topic_searches__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"任务标识"},"description":"任务标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"已保存的话题搜索结果响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"已保存的话题搜索结果响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/providers/weread/subscriptions/register-from":{"post":{"summary":"搜索或文章反查后注册","operationId":"register_from_api_v1_management_providers_weread_subscriptions_register_from_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterFromRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"搜索或文章反查后注册响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"搜索或文章反查后注册响应"}}}}},"tags":["公众号发现、注册与话题搜索"],"description":"请求微信读书 并写订阅；重复 book_id 不更新"}},"/api/v1/management/providers/weread/catchups":{"post":{"summary":"创建并执行独立历史补拉","operationId":"catchup_create_api_v1_management_providers_weread_catchups_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatchupRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"创建并执行独立历史补拉响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"创建并执行独立历史补拉响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"开始时刷新凭证一次；不改变正常批次进度"}},"/api/v1/management/providers/weread/catchups/{uid}":{"get":{"summary":"已保存的补拉进度","operationId":"catchup_result_api_v1_management_providers_weread_catchups__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"任务标识"},"description":"任务标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"已保存的补拉进度响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"已保存的补拉进度响应"}}}}},"tags":["库内文章与运行记录"],"description":"只读数据库，不执行补拉"}},"/api/v1/management/providers/weread/catchups/{uid}/continue":{"post":{"summary":"继续未完成的历史补拉","operationId":"catchup_continue_api_v1_management_providers_weread_catchups__uid__continue_post","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","title":"任务标识"},"description":"任务标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"继续未完成的历史补拉响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"继续未完成的历史补拉响应"}}}}},"tags":["拉取、时间表与历史补拉"],"description":"请求微信读书 并入库，复用原检查点"}},"/api/v1/internal/weread/tick":{"post":{"summary":"执行一次调度检查","operationId":"scheduled_tick_api_v1_internal_weread_tick_post","parameters":[{"name":"X-Wxmpapi-Scheduler-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"调度专用密钥"},"description":"内部调度专用请求头密钥，不能使用管理密钥替代。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"执行一次调度检查响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"执行一次调度检查响应"}}}}},"tags":["内部定时调度"],"description":"可能续期、保活和拉取；使用调度专用密钥，不是只读探活。"}},"/api/v1/internal/weread/dispatch":{"post":{"summary":"快速接收调度请求","description":"快速接收调度，HTTP响应发送完毕后执行已有维护与采集逻辑。\n\n使用独立调度密钥。202仅表示接收，不表示业务成功；结果查管理overview和调度日志。\n每进程最多一个任务，跨进程由数据库租约防重；进程中断由后续Cron根据持久检查点恢复。\n单次后台工作软预算最多600秒，不改变refresh随机间隔、保活步骤或采集时间表。","operationId":"dispatch_scheduled_work_api_v1_internal_weread_dispatch_post","parameters":[{"name":"X-Wxmpapi-Scheduler-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"调度专用密钥"},"description":"内部调度专用请求头密钥，不能使用管理密钥替代。"}],"responses":{"202":{"description":"请求成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchReceipt","title":"快速接收调度请求响应"}}}},"200":{"description":"本进程已有调度任务，未重复排队","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DispatchReceipt","title":"快速接收调度请求响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"快速接收调度请求响应"}}}}},"tags":["内部定时调度"]}},"/api/v1/management/articles":{"get":{"summary":"查询库内文章列表","description":"默认列正式文章；book_id模式列该号发现记录并关联正文。纯查库，无隐式抓取。","operationId":"stored_articles_api_v1_management_articles_get","parameters":[{"name":"book_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^MP_WXS_[0-9]{1,32}$"},{"type":"null"}],"title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":9223372036854775807,"minimum":1},{"type":"null"}],"title":"内容库公众号编号"},"description":"内容库公众号的数字编号；查询文章列表时不能与 book_id 同时传入。"},{"name":"published_from","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":253402300799,"minimum":0},{"type":"null"}],"description":"发布时间下限，Unix秒，包含边界","title":"发布时间下限"},"description":"发布时间下限，Unix秒，包含边界"},{"name":"published_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":253402300799,"minimum":0},{"type":"null"}],"description":"发布时间上限，Unix秒，不包含边界","title":"发布时间上限"},"description":"发布时间上限，Unix秒，不包含边界"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"返回数量上限"},"description":"返回数量上限"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}],"title":"分页游标"},"description":"分页游标"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredArticlePage","title":"查询库内文章列表响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"查询库内文章列表响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/articles/by-review":{"get":{"summary":"按采集标识读取正文","description":"缺正文返回not_saved；不存在的发现记录返回404。不解析原文或访问WeRead。","operationId":"stored_article_by_review_api_v1_management_articles_by_review_get","parameters":[{"name":"book_id","in":"query","required":true,"schema":{"type":"string","pattern":"^MP_WXS_[0-9]{1,32}$","title":"微信读书公众号标识"},"description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},{"name":"review_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_~\\-]{1,256}$","title":"微信读书文章标识"},"description":"微信读书文章标识，保持原值，包括其中的 ~ 字符。"},{"name":"include_html","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"是否返回原始网页正文"},"description":"默认只读正文文本；设为 true 时附带已保存的原始HTML，不补抓原文。"},{"name":"assets_after_id","in":"query","required":false,"schema":{"type":"integer","maximum":9223372036854775807,"minimum":0,"default":0,"title":"媒体分页起点"},"description":"媒体分页起点，使用上次返回的 assets_next_after_id；首次传0或省略。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredArticleDetail","title":"按采集标识读取正文响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"按采集标识读取正文响应"}}}}},"tags":["库内文章与运行记录"]}},"/api/v1/management/articles/{article_id}":{"get":{"summary":"读取库内文章正文","description":"返回已存文本；include_html=true附原始HTML。媒体每页最多100项，按id续读。","operationId":"stored_article_detail_api_v1_management_articles__article_id__get","parameters":[{"name":"article_id","in":"path","required":true,"schema":{"type":"integer","maximum":9223372036854775807,"minimum":1,"title":"内容库文章编号"},"description":"内容库文章编号"},{"name":"include_html","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"是否返回原始网页正文"},"description":"默认只读正文文本；设为 true 时附带已保存的原始HTML，不补抓原文。"},{"name":"assets_after_id","in":"query","required":false,"schema":{"type":"integer","maximum":9223372036854775807,"minimum":0,"default":0,"title":"媒体分页起点"},"description":"媒体分页起点，使用上次返回的 assets_next_after_id；首次传0或省略。"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredArticleDetail","title":"读取库内文章正文响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"读取库内文章正文响应"}}}}},"tags":["库内文章与运行记录"]}},"/":{"get":{"summary":"API 说明首页","description":"阅读接口使用说明，不发起业务请求。","operationId":"index__get","responses":{"200":{"description":"请求成功","content":{"text/html":{"schema":{"type":"string","title":"API 说明首页响应"}}}}},"tags":["公开解析与服务状态"]}},"/api/health":{"get":{"summary":"服务健康检查","operationId":"health_api_health_get","responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"服务健康检查响应"}}}}},"tags":["公开解析与服务状态"],"description":"服务探活，不请求微信读书或解析文章。"}},"/api/v1/resolve":{"get":{"summary":"公开链接解析","description":"解析公开文章正文及媒体链接；合集仅列文章链接，不逐篇解析。\n\n文章失败或部分解析时补充 diagnostics.reason_code、中文 message/suggestion；\n区分 CONTENT_PRIVATE（作者隐私）、CONTENT_BLOCKED（平台限制）、\nCONTENT_DELETED（发布者删除）、CAPTCHA（验证页）及 NO_JS_CONTENT（原因不明）。\n原状态和错误码保持兼容；文章不可见仍返回 HTTP200/status=failed，不代表管理鉴权失败。\n不使用微信读书登录态，不保存结果，不增加重试。","operationId":"resolve_public_api_v1_resolve_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。","title":"微信文章或合集链接"},"description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"公开链接解析响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"公开链接解析响应"}}}}},"tags":["公开解析与服务状态"]}},"/api/v1/management/links/resolve":{"post":{"summary":"管理链接解析","description":"管理鉴权后完整解析，可选返回原始内容及保存。\n\narticle.diagnostics 提供具体原因及中文 message/suggestion，无需 raw_meta。\n保存失败保留已解析正文，返回409/502/503和 storage_error.diagnostics；\nactions.article_saved=false 不能证明完全没有写入。提示不改变重试策略。","operationId":"resolve_management_link_api_v1_management_links_resolve_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManagementLinkResolveRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"管理链接解析响应"}}}},"409":{"description":"文章身份冲突，保存未完成；保留已解析结果"},"502":{"description":"存储返回错误，保存未完成；保留已解析结果"},"503":{"description":"存储暂不可用或未配置，保存未完成；保留已解析结果"},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"管理链接解析响应"}}}}},"tags":["管理解析与导出"]}},"/api/v1/management/exports/article":{"post":{"summary":"创建单篇文章导出","description":"解析文章并生成临时 ZIP 文件及下载地址；需要管理密钥。","operationId":"create_article_export_api_v1_management_exports_article_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleExportRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"创建单篇文章导出响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"创建单篇文章导出响应"}}}}},"tags":["管理解析与导出"]}},"/api/v1/exports/{export_id}/download":{"get":{"summary":"下载临时文章压缩包","operationId":"download_export_api_v1_exports__export_id__download_get","parameters":[{"name":"export_id","in":"path","required":true,"schema":{"type":"string","title":"导出标识"},"description":"导出标识"},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"下载令牌"},"description":"创建导出时返回的临时下载令牌；无需额外管理请求头。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"下载临时文章压缩包响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"下载临时文章压缩包响应"}}}}},"tags":["管理解析与导出"],"description":"仅读取已生成的导出文件，使用创建导出时返回的下载令牌。"}},"/api/articles/parse-url":{"post":{"summary":"底层文章解析","description":"需要管理密钥，按请求可保存内容或下载资源；通常使用公开或管理链接解析入口。","operationId":"parse_article_url_api_articles_parse_url_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseUrlRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"底层文章解析响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"底层文章解析响应"}}}}},"tags":["底层解析与可选诊断"]}},"/api/v1/management/status":{"get":{"summary":"检查管理鉴权","operationId":"management_status_api_v1_management_status_get","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"检查管理鉴权响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"检查管理鉴权响应"}}}}},"tags":["管理解析与导出"],"description":"验证管理密钥，不执行解析或账号探测。"}},"/api/v1/management/probes/weread/login-sessions":{"post":{"summary":"创建可选诊断会话","operationId":"create_weread_probe_session_api_v1_management_probes_weread_login_sessions_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"创建可选诊断会话响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"创建可选诊断会话响应"}}}}},"tags":["底层解析与可选诊断"],"description":"依赖外部辅助服务，默认关闭；不属于正式日常采集入口。"}},"/api/v1/management/probes/weread/login-sessions/{probe_id}/run":{"post":{"summary":"执行可选会话诊断","operationId":"run_weread_probe_session_api_v1_management_probes_weread_login_sessions__probe_id__run_post","parameters":[{"name":"probe_id","in":"path","required":true,"schema":{"type":"string","title":"诊断会话标识"},"description":"诊断会话标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WereadProbeRunRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"执行可选会话诊断响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"执行可选会话诊断响应"}}}}},"tags":["底层解析与可选诊断"],"description":"通过辅助服务执行所选诊断；默认关闭，不用于日常采集。"}},"/api/v1/management/probes/weread/login-sessions/{probe_id}":{"delete":{"summary":"删除可选诊断会话","operationId":"delete_weread_probe_session_api_v1_management_probes_weread_login_sessions__probe_id__delete","parameters":[{"name":"probe_id","in":"path","required":true,"schema":{"type":"string","title":"诊断会话标识"},"description":"诊断会话标识"},{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"删除可选诊断会话响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"删除可选诊断会话响应"}}}}},"tags":["底层解析与可选诊断"],"description":"删除辅助服务诊断会话；不是退出正式账号的接口。"}},"/api/albums/parse-url":{"post":{"summary":"底层合集解析","description":"需要管理密钥，按请求可解析合集条目；通常使用公开或管理链接解析入口。","operationId":"parse_album_url_api_albums_parse_url_post","parameters":[{"name":"X-Wxmpapi-Management-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"管理密钥"},"description":"管理请求头密钥，仅在服务端或可信脚本中使用。"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseAlbumRequest"}}}},"responses":{"200":{"description":"请求成功","content":{"application/json":{"schema":{"title":"底层合集解析响应"}}}},"422":{"description":"请求参数校验失败","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError","title":"底层合集解析响应"}}}}},"tags":["底层解析与可选诊断"]}}},"components":{"schemas":{"AlbumResolveOptions":{"properties":{"max_articles":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"最多处理文章数","default":5},"include_items":{"type":"boolean","title":"是否包含合集条目","default":true},"include_content":{"type":"boolean","title":"是否包含正文","default":false},"delay":{"type":"number","minimum":0.0,"title":"请求间隔（秒）","default":0.8}},"type":"object","title":"合集解析选项"},"ArticleCursor":{"properties":{"book_id":{"type":"string","pattern":"^MP_WXS_[0-9]+$","title":"微信读书公众号标识","description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},"offset":{"type":"integer","minimum":0.0,"title":"分页偏移量","default":0},"synckey":{"type":"string","maxLength":512,"title":"上游同步标识","default":"0"}},"additionalProperties":false,"type":"object","required":["book_id"],"title":"文章分页游标"},"ArticleExportRequest":{"properties":{"url":{"type":"string","title":"微信文章或合集链接","description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。"},"storage":{"$ref":"#/components/schemas/StorageOptions","title":"保存选项"},"export":{"$ref":"#/components/schemas/ExportOptions","title":"导出选项"}},"type":"object","required":["url"],"title":"文章导出请求"},"ArticlePagesRequest":{"properties":{"pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"页数","default":1},"cursor":{"anyOf":[{"$ref":"#/components/schemas/ArticleCursor"},{"type":"null"}],"title":"分页游标"},"resolve_urls":{"type":"boolean","title":"是否获取原文链接","default":false},"request_limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"上游请求次数预算","default":80}},"type":"object","title":"文章分页请求"},"AssetResolveOptions":{"properties":{"mode":{"type":"string","enum":["none","metadata_only","download"],"title":"处理模式","default":"metadata_only","description":"none 不提取媒体信息；metadata_only 仅提取链接；download 可下载图片。"},"max_images":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"最多下载图片数","description":"0 表示不设置数量上限。","default":0},"audio":{"type":"string","enum":["none","metadata_only","download"],"title":"音频处理方式","default":"metadata_only","description":"音频处理方式：none、metadata_only 或 download；是否执行还受整体媒体模式影响。"},"video":{"type":"string","enum":["none","metadata_only"],"title":"视频处理方式","default":"metadata_only","description":"视频仅支持不处理或返回链接信息，不下载视频文件。"}},"type":"object","title":"媒体处理选项"},"CatchupRequest":{"properties":{"since":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"采集起始时间","description":"起始时间，Unix秒；省略时使用上次完整采集成功时间，无记录时必须指定。"},"upper":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"采集结束时间"},"book_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"公众号标识列表"},"pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"页数","default":1},"parse":{"type":"boolean","title":"是否解析正文","default":false}},"type":"object","title":"历史补拉请求"},"ContentAttempt":{"properties":{"status":{"type":"string","enum":["saved","failed"],"title":"状态"},"failure_count":{"type":"integer","minimum":0.0,"title":"累计失败次数"},"first_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"首次失败时间"},"last_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近失败时间"},"last_attempt_at":{"type":"string","format":"date-time","title":"最近尝试时间"},"run_id":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"批次标识"},"code":{"anyOf":[{"type":"string","enum":["PARSE_FAILED","SAVE_FAILED","EMPTY_CONTENT"]},{"type":"null"}],"title":"结果代码"},"diagnostics":{"anyOf":[{"$ref":"#/components/schemas/ContentDiagnostics"},{"type":"null"}],"title":"安全诊断信息"}},"type":"object","required":["status","failure_count","last_attempt_at","run_id"],"title":"正文处理记录"},"ContentDiagnostics":{"properties":{"stage":{"type":"string","enum":["fetch","parse","save"],"title":"处理阶段"},"reason_code":{"type":"string","enum":["HTTP_ERROR","NETWORK_ERROR","NETWORK_TIMEOUT","UNEXPECTED_EXCEPTION","UNKNOWN_PARSE_FAILURE","CAPTCHA","NO_JS_CONTENT","PARTIAL_CONTENT","INVALID_PARSER_RESPONSE","EMPTY_CONTENT","INVALID_STORAGE_RESULT","CONTENT_PRIVATE","CONTENT_BLOCKED","CONTENT_DELETED","STORAGE_ERROR","STORAGE_CONFLICT","STORAGE_UNAVAILABLE","STORAGE_NOT_CONFIGURED"],"title":"原因代码"},"message":{"type":"string","title":"中文原因说明","description":"根据已知原因生成的中文说明，不包含原始错误文本"},"suggestion":{"type":"string","title":"处理建议","description":"供调用者参考的处理建议，不改变自动重试策略"},"http_status":{"anyOf":[{"type":"integer","maximum":599.0,"minimum":100.0},{"type":"null"}],"title":"上游HTTP状态码"},"exception_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"异常类型"},"fetch_status":{"anyOf":[{"type":"string","enum":["ok","captcha","unknown_error"]},{"type":"null"}],"title":"页面获取状态"},"parse_status":{"anyOf":[{"type":"string","enum":["ok","partial","skipped","no_js_content"]},{"type":"null"}],"title":"正文解析状态"},"fallback":{"anyOf":[{"type":"string","const":"cgiDataNew"},{"type":"null"}],"title":"备用解析方式"},"database_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"数据库错误码"},"constraint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"冲突约束名"},"table":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"相关数据表"}},"type":"object","required":["stage","reason_code","message","suggestion"],"title":"正文失败诊断"},"ContentFailure":{"properties":{"status":{"type":"string","enum":["saved","failed"],"title":"状态"},"failure_count":{"type":"integer","minimum":0.0,"title":"累计失败次数"},"first_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"首次失败时间"},"last_failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近失败时间"},"last_attempt_at":{"type":"string","format":"date-time","title":"最近尝试时间"},"run_id":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"批次标识"},"code":{"anyOf":[{"type":"string","enum":["PARSE_FAILED","SAVE_FAILED","EMPTY_CONTENT"]},{"type":"null"}],"title":"结果代码"},"diagnostics":{"anyOf":[{"$ref":"#/components/schemas/ContentDiagnostics"},{"type":"null"}],"title":"安全诊断信息"},"review_id":{"type":"string","pattern":"^[A-Za-z0-9_~\\-]{1,256}$","title":"微信读书文章标识","description":"微信读书文章标识，保持原值，包括其中的 ~ 字符。"}},"type":"object","required":["status","failure_count","last_attempt_at","run_id","review_id"],"title":"正文失败条目"},"DispatchReceipt":{"properties":{"status":{"type":"string","enum":["accepted","busy"],"title":"状态","description":"accepted只表示已接收；busy表示本进程已有任务，不新增队列"},"dispatch_id":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"调度关联编号","description":"本进程调度关联编号，可用于查询结构化日志"}},"type":"object","required":["status","dispatch_id"],"title":"调度接收回执"},"ExportOptions":{"properties":{"format":{"type":"string","const":"zip","title":"输出格式","default":"zip"},"media_mode":{"type":"string","enum":["url_only","download_limited"],"title":"导出媒体方式","default":"url_only","description":"当前仅支持 url_only，在导出文件中保留媒体链接；download_limited 尚未实现。"},"save_export":{"type":"boolean","title":"是否持久保存导出文件","default":false,"description":"当前仅支持 false，导出文件在有效期内临时保存。"},"ttl_seconds":{"type":"integer","maximum":3600.0,"minimum":60.0,"title":"下载有效期（秒）","default":300}},"type":"object","title":"导出选项"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"错误详情"}},"type":"object","title":"请求参数校验失败"},"HeartbeatIssue":{"properties":{"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"请求路径"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"结果代码"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"原因"}},"type":"object","title":"保活异常条目"},"HeartbeatOverview":{"properties":{"anchor":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"保活关联时间"},"current_lifecycle":{"type":"boolean","title":"是否属于当前登录周期"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"处理模式"},"total_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"保活总步骤数"},"attempted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已尝试步骤数"},"ok":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已确认成功步骤数"},"errors":{"items":{"$ref":"#/components/schemas/HeartbeatIssue"},"type":"array","title":"已确认错误"},"unknown":{"items":{"$ref":"#/components/schemas/HeartbeatIssue"},"type":"array","title":"结果未知的步骤"},"pending":{"type":"boolean","title":"是否仍有待处理任务"},"next_step":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"下一保活步骤"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"停止原因"}},"type":"object","required":["anchor","current_lifecycle","mode","total_steps","attempted","ok","errors","unknown","pending","next_step","stop_reason"],"title":"保活结果"},"IdentifyArticleRequest":{"properties":{"article_url":{"type":"string","title":"微信文章链接","description":"微信公众号文章的完整链接，使用 https://mp.weixin.qq.com。"}},"type":"object","required":["article_url"],"title":"文章反查请求"},"MaintenanceOverview":{"properties":{"recorded":{"type":"boolean","title":"是否已有持久记录"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"记录更新时间"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"任务锁过期时间"},"lease_active":{"type":"boolean","title":"是否存在未过期任务锁","description":"存在未过期的持久任务锁，不代表执行进程仍然存活。"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"状态"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"错误码"},"schedule_current":{"type":"boolean","title":"维护计划是否属于当前登录周期"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"下次维护尝试时间"},"next_attempt_kind":{"anyOf":[{"type":"string","enum":["periodic_refresh","retry"]},{"type":"null"}],"title":"下次维护类型"},"due":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否已到计划时间","description":"已到计划时间，不代表当前具备执行条件。"},"last_refresh_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近周期刷新成功时间","description":"历史周期刷新成功时间，可能属于之前的登录周期。"},"last_heartbeat_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近保活结束时间","description":"历史保活序列结束时间，不保证所有保活步骤成功。"},"heartbeat_mode":{"type":"string","title":"保活模式"},"heartbeat":{"anyOf":[{"$ref":"#/components/schemas/HeartbeatOverview"},{"type":"null"}],"title":"保活结果"},"requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已发起请求数","description":"最近一次有记录的维护调用发出的请求数。"}},"type":"object","required":["recorded","updated_at","lease_expires_at","lease_active","status","error_code","schedule_current","next_attempt_at","next_attempt_kind","due","last_refresh_success_at","last_heartbeat_at","heartbeat_mode","heartbeat","requests"],"title":"周期维护概览"},"ManagementLinkResolveRequest":{"properties":{"url":{"type":"string","title":"微信文章或合集链接","description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。"},"return":{"$ref":"#/components/schemas/ReturnOptions","title":"返回内容选项"},"assets":{"$ref":"#/components/schemas/AssetResolveOptions","title":"媒体处理选项"},"storage":{"$ref":"#/components/schemas/StorageOptions","title":"保存选项"},"album":{"$ref":"#/components/schemas/AlbumResolveOptions","title":"合集选项"},"output":{"$ref":"#/components/schemas/OutputOptions","title":"输出选项"}},"type":"object","required":["url"],"title":"管理链接解析请求","description":"需要管理鉴权的完整链接解析请求。"},"NewInstallationRequest":{"properties":{"expected_profile_uid":{"type":"string","pattern":"^wrip_[A-Za-z0-9_-]{3,123}$","title":"预期当前设备标识","description":"必须与当前设备标识一致；更换设备会作废旧会话，之后需要扫码登录。"}},"type":"object","required":["expected_profile_uid"],"title":"更换设备请求"},"OutputOptions":{"properties":{"mode":{"type":"string","enum":["inline","artifact","package"],"title":"处理模式","default":"inline","description":"保留的输出模式选项；当前链接解析返回内联JSON，ZIP导出使用独立接口。"},"package_format":{"anyOf":[{"type":"string","const":"zip"},{"type":"null"}],"title":"打包格式"}},"type":"object","title":"输出选项"},"ParseAlbumRequest":{"properties":{"url":{"type":"string","title":"微信文章或合集链接","description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"返回数量上限","default":5},"include_assets":{"type":"boolean","title":"是否包含媒体信息","default":false},"asset_mode":{"type":"string","enum":["none","metadata_only","download"],"title":"媒体处理方式","default":"none"},"max_images":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"最多下载图片数","default":0,"description":"最多下载的图片数；0 表示不设置数量上限。"},"delay":{"type":"number","minimum":0.0,"title":"请求间隔（秒）","default":0.8},"save_articles":{"type":"boolean","title":"是否保存合集文章产物","default":false}},"type":"object","required":["url"],"title":"底层合集解析请求"},"ParseUrlRequest":{"properties":{"url":{"type":"string","title":"微信文章或合集链接","description":"微信公众号文章或合集的完整链接；无需手动补充 chksm。"},"format":{"type":"string","enum":["metadata","text","html_raw","html_clean","markdown"],"title":"输出格式","default":"text"},"save_article":{"type":"boolean","title":"是否保存文章","default":false},"include_assets":{"type":"boolean","title":"是否包含媒体信息","default":true},"asset_mode":{"type":"string","enum":["none","metadata_only","download"],"title":"媒体处理方式","default":"metadata_only"},"max_images":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"最多下载图片数","default":0,"description":"最多下载的图片数；0 表示不设置数量上限。"},"force_refresh":{"type":"boolean","title":"是否新建本地产物目录","default":false,"description":"保存到本地时生成新的产物目录；不是刷新微信读书登录凭证。"}},"type":"object","required":["url"],"title":"底层文章解析请求"},"ProviderOverview":{"properties":{"slot":{"type":"string","title":"槽位或选择序号","description":"当前账号存储槽位。"},"status":{"type":"string","title":"状态"},"has_active_credential":{"type":"boolean","title":"是否存在正式凭证"},"has_candidate_credential":{"type":"boolean","title":"是否存在候选凭证"},"business_verified":{"type":"boolean","title":"当前凭证是否经业务验证","description":"当前凭证已有成功业务请求且没有已记录错误时为 true；刷新或保活成功不算业务验证。"},"last_success_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近业务成功时间"},"last_authenticated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近凭证接纳时间"},"last_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"最近错误码"}},"type":"object","required":["slot","status","has_active_credential","has_candidate_credential","business_verified","last_success_at","last_authenticated_at","last_error_code"],"title":"账号状态概览"},"PullAccountRequest":{"properties":{"pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"页数","default":1},"max_articles":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"最多处理文章数","default":0,"description":"本次最多完成的文章数；0 表示不限。"},"request_limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"上游请求次数预算","default":80},"parse":{"type":"boolean","title":"是否解析正文","default":false},"overlap_seconds":{"type":"integer","maximum":604800.0,"minimum":0.0,"title":"重叠采集时间（秒）","default":0}},"type":"object","title":"手动采集请求"},"PullResult":{"properties":{"book_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"微信读书公众号标识","description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},"complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否全部完成"},"skipped":{"type":"boolean","title":"是否跳过本号","default":false},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"停止原因"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"页数"},"articles_completed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已完成文章数"},"collection_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"列表采集是否完成"},"content_failed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"正文失败数"},"content_failures":{"items":{"$ref":"#/components/schemas/ContentFailure"},"type":"array","maxItems":10,"title":"正文失败样本"},"missing_urls":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"缺少原文链接数"},"skipped_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"跳过的异常记录数"},"range_exhausted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否已覆盖指定时间范围"},"page_limit_reached":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否达到页数上限"},"requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已发起请求数"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"完成时间"}},"type":"object","title":"公众号采集结果"},"PullRoundOverview":{"properties":{"recorded":{"type":"boolean","title":"是否已有持久记录"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"记录更新时间"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"任务锁过期时间"},"lease_active":{"type":"boolean","title":"是否存在未过期任务锁","description":"存在未过期的持久任务锁，不代表执行进程仍然存活。"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"批次标识"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"状态"},"current_lifecycle":{"type":"boolean","title":"是否属于当前登录周期"},"pending":{"type":"boolean","title":"是否仍有待处理任务"},"remaining_accounts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"待处理公众号数"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"完成时间"},"last_successful_round_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近完整采集成功时间"},"last_collection_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近列表采集完成时间"},"stop_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"停止原因"},"skipped":{"items":{"type":"string"},"type":"array","title":"跳过条目"},"results":{"items":{"$ref":"#/components/schemas/PullResult"},"type":"array","title":"逐号处理结果"}},"type":"object","required":["recorded","updated_at","lease_expires_at","lease_active","run_id","status","current_lifecycle","pending","remaining_accounts","finished_at","last_successful_round_at","stop_reason","skipped","results"],"title":"采集批次概览"},"PullSettings":{"properties":{"enabled":{"type":"boolean","title":"是否启用","default":true},"times":{"items":{"type":"string"},"type":"array","title":"每日采集时段","description":"每天1～3个 HH:MM 时段，含跨午夜的相邻时段至少间隔4小时；使用服务配置时区。"},"immediate_first_pull":{"type":"boolean","title":"首次立即采集开关","default":false},"max_pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"每号最多采集页数","default":1}},"additionalProperties":false,"type":"object","title":"定时采集设置"},"PullsOverview":{"properties":{"settings":{"$ref":"#/components/schemas/PullSettings","title":"采集设置"},"settings_recorded":{"type":"boolean","title":"是否已有采集设置"},"settings_revision":{"type":"integer","title":"采集设置版本"},"runtime_enabled":{"type":"boolean","title":"运行总开关"},"parse_enabled":{"type":"boolean","title":"自动正文解析开关"},"automatic_enabled":{"type":"boolean","title":"自动采集是否开启","description":"仅表示调度与采集开关的合并结果。"},"schedule_reconciled":{"type":"boolean","title":"计划是否已同步最新设置"},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"记录中的下一采集时间","description":"已记录的批次计划；尚未同步当前设置版本时为空。"},"due":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否已到计划时间"},"next_configured_slot_at":{"type":"string","format":"date-time","title":"按时间表计算的下一时段","description":"仅按时间表计算的下一时段，尚未考虑执行条件、任务锁和维护计划。"},"round":{"$ref":"#/components/schemas/PullRoundOverview","title":"采集批次"}},"type":"object","required":["settings","settings_recorded","settings_revision","runtime_enabled","parse_enabled","automatic_enabled","schedule_reconciled","next_run_at","due","next_configured_slot_at","round"],"title":"自动采集概览"},"RegisterAccountRequest":{"properties":{"book_id":{"type":"string","pattern":"^MP_WXS_[0-9]+$","title":"微信读书公众号标识","description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"订阅名称"},"since":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"采集起始时间","description":"初始采集起点，Unix秒；省略时使用服务时区当天零点。"},"immediate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否立即首次采集","description":"是否安排首次立即采集；省略时使用已保存的首次采集设置，注册接口不当场拉取。"}},"type":"object","required":["book_id","name"],"title":"注册公众号请求"},"RegisterFromRequest":{"properties":{"keyword":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"搜索关键词","description":"公众号名称关键词，与 article_url 二选一。"},"article_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"微信文章链接","description":"用于反查公众号的文章链接，与 keyword 二选一。"},"slot":{"type":"integer","minimum":1.0,"title":"槽位或选择序号","default":1,"description":"从公众号搜索结果中选择的位置，从1开始。"},"mode":{"type":"string","enum":["app","direct"],"title":"处理模式","default":"app","description":"公众号搜索方式：app 为应用搜索流程，direct 为直接搜索。"},"immediate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否立即首次采集","description":"是否安排首次立即采集；省略时使用已保存的首次采集设置，注册接口不当场拉取。"}},"type":"object","title":"搜索或反查注册请求"},"ReturnOptions":{"properties":{"format":{"type":"string","enum":["metadata","text","html_raw","html_clean","markdown"],"title":"输出格式","default":"text","description":"metadata 返回元数据，text 返回文本，html_raw 返回原始正文HTML；html_clean/markdown 目前仅保留选项，对应字段为空。"},"content":{"type":"boolean","title":"是否返回正文","default":true},"metadata":{"type":"boolean","title":"是否返回元数据","default":true},"account":{"type":"boolean","title":"是否返回公众号信息","default":true},"assets":{"type":"boolean","title":"是否返回媒体信息","default":true},"raw_meta":{"type":"boolean","title":"是否返回解析诊断原数据","default":false}},"type":"object","title":"返回内容选项"},"RuntimeOverview":{"properties":{"observed_at":{"type":"string","format":"date-time","title":"概览读取时间"},"timezone":{"type":"string","title":"时区"},"snapshot_consistency":{"type":"string","const":"best_effort","title":"快照一致性说明","default":"best_effort"},"provider":{"$ref":"#/components/schemas/ProviderOverview","title":"账号状态"},"scheduler":{"$ref":"#/components/schemas/SchedulerOverview","title":"调度状态"},"maintenance":{"$ref":"#/components/schemas/MaintenanceOverview","title":"周期维护"},"pulls":{"$ref":"#/components/schemas/PullsOverview","title":"自动采集"},"subscriptions":{"$ref":"#/components/schemas/SubscriptionsOverview","title":"订阅汇总"}},"type":"object","required":["observed_at","timezone","provider","scheduler","maintenance","pulls","subscriptions"],"title":"运行概览"},"SchedulerOverview":{"properties":{"recorded":{"type":"boolean","title":"是否已有持久记录"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"记录更新时间"},"lease_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"任务锁过期时间"},"lease_active":{"type":"boolean","title":"是否存在未过期任务锁","description":"存在未过期的持久任务锁，不代表执行进程仍然存活。"},"enabled":{"type":"boolean","title":"是否启用"},"last_result":{"anyOf":[{"$ref":"#/components/schemas/SchedulerResult"},{"type":"null"}],"title":"最近执行结果"},"last_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最近完成时间","description":"最近有记录的无异常调度完成时间，可能早于最近执行结果。"},"cooldown_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"下次允许检查时间","description":"记录中最早允许再次检查的时间，不是定时任务实际执行时间。"}},"type":"object","required":["recorded","updated_at","lease_expires_at","lease_active","enabled","last_result","last_completed_at","cooldown_until"],"title":"调度概览"},"SchedulerResult":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"状态"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"错误码"},"requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"已发起请求数"}},"type":"object","title":"调度执行结果"},"SearchCursor":{"properties":{"keyword":{"type":"string","maxLength":64,"minLength":1,"title":"搜索关键词"},"scope":{"type":"integer","enum":[2,4],"title":"搜索范围","description":"2 表示公众号搜索，4 表示话题文章搜索。"},"count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"每页条数"},"sid":{"type":"string","maxLength":512,"minLength":1,"title":"上游搜索会话标识"},"query_uid":{"type":"string","maxLength":512,"minLength":1,"title":"搜索查询标识"},"max_idx":{"type":"integer","minimum":1.0,"title":"搜索页末尾索引"}},"additionalProperties":false,"type":"object","required":["keyword","scope","count","sid","query_uid","max_idx"],"title":"搜索分页游标"},"SearchPagesRequest":{"properties":{"keyword":{"type":"string","maxLength":64,"minLength":1,"title":"搜索关键词"},"scope":{"type":"integer","enum":[2,4],"title":"搜索范围","description":"2 表示公众号搜索，4 表示话题文章搜索。","default":4},"mode":{"type":"string","enum":["auto","app","direct"],"title":"处理模式","default":"auto","description":"auto 按搜索范围选择；app 为应用搜索流程，direct 为直接搜索；话题搜索仅支持 auto/direct。"},"pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"页数","default":1},"count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"每页条数","default":15},"cursor":{"anyOf":[{"$ref":"#/components/schemas/SearchCursor"},{"type":"null"}],"title":"分页游标"},"request_limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"上游请求次数预算","default":80},"force":{"type":"boolean","title":"是否跳过搜索避让限制","default":false,"description":"仅对话题搜索有效：显式跳过时段避让与刷新窗口次数限制，不取消请求预算。"}},"type":"object","required":["keyword"],"title":"分页搜索请求"},"StorageOptions":{"properties":{"save":{"type":"boolean","title":"是否保存结果","default":false,"description":"默认只临时解析。开启后保存单篇结果；合集逐篇写入内容库尚未实现。"},"force_refresh":{"type":"boolean","title":"是否新建本地产物目录","default":false,"description":"保存到本地时生成新的产物目录；不是刷新微信读书登录凭证。"},"backend":{"anyOf":[{"type":"string","enum":["local","supabase"]},{"type":"null"}],"title":"保存后端","description":"local 保存本地产物；supabase 写入内容库；省略时按服务配置选择。"}},"type":"object","title":"保存选项"},"StoredArticle":{"properties":{"article_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"内容库文章编号"},"article_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"文章唯一标识"},"account_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"内容库公众号编号","description":"内容库公众号的数字编号；查询文章列表时不能与 book_id 同时传入。"},"book_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"微信读书公众号标识","description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},"review_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"微信读书文章标识","description":"微信读书文章标识，保持原值，包括其中的 ~ 字符。"},"mp_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"公众号名称"},"biz":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"微信公众号标识"},"title":{"type":"string","title":"文章标题"},"original_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"原始链接"},"canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"规范文章链接","description":"规范文章链接，不含请求时生成的随机 chksm；来源原值见 original_url。"},"cover_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"封面链接"},"digest":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"文章摘要"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"作者"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"文章发布时间"},"first_seen_at":{"type":"string","format":"date-time","title":"首次入库时间"},"source":{"type":"string","title":"文章来源"},"body_status":{"type":"string","enum":["available","not_saved"],"title":"正文可用状态","description":"available 表示已有可读正文；not_saved 表示尚未保存，查询不会触发解析。"},"link_method":{"anyOf":[{"type":"string","enum":["recorded_id","exact_url"]},{"type":"null"}],"title":"正文关联方式"},"discovery_parse_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"发现记录的正文状态"},"discovery_error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"文章发现错误码"},"content_attempt":{"anyOf":[{"$ref":"#/components/schemas/ContentAttempt"},{"type":"null"}],"title":"最近正文处理记录"}},"type":"object","required":["article_id","title","original_url","published_at","first_seen_at","source","body_status"],"title":"库内文章信息"},"StoredArticleDetail":{"properties":{"article":{"$ref":"#/components/schemas/StoredArticle","title":"文章信息"},"content":{"anyOf":[{"$ref":"#/components/schemas/StoredContent"},{"type":"null"}],"title":"正文内容"},"assets":{"items":{"$ref":"#/components/schemas/StoredAsset"},"type":"array","title":"媒体信息"},"assets_has_more":{"type":"boolean","title":"是否还有媒体记录"},"assets_next_after_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"下一页媒体游标"}},"type":"object","required":["article","content","assets","assets_has_more","assets_next_after_id"],"title":"库内文章正文详情"},"StoredArticlePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoredArticle"},"type":"array","title":"结果条目"},"has_more":{"type":"boolean","title":"是否还有下一页"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"下一页游标"},"order":{"type":"string","enum":["article_id_desc","published_at_desc_review_id_desc"],"title":"排序方式"}},"type":"object","required":["items","has_more","next_cursor","order"],"title":"库内文章列表"},"StoredAsset":{"properties":{"id":{"type":"integer","title":"记录编号"},"kind":{"type":"string","title":"媒体类别"},"original_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"原始链接"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"媒体用途"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"媒体排列序号"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"媒体内容类型"},"bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"文件字节数"}},"type":"object","required":["id","kind","original_url"],"title":"已保存媒体信息"},"StoredContent":{"properties":{"artifact_id":{"type":"integer","title":"正文记录编号"},"schema_version":{"type":"string","title":"正文结构版本"},"source_adapter":{"type":"string","title":"解析来源"},"parse_status":{"type":"string","title":"正文解析状态"},"created_at":{"type":"string","format":"date-time","title":"创建时间"},"text_available":{"type":"boolean","title":"是否已保存正文文本"},"html_available":{"type":"boolean","title":"是否已保存网页正文"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"正文文本"},"html_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"原始网页正文"},"html_included":{"type":"boolean","title":"本次是否返回网页正文"}},"type":"object","required":["artifact_id","schema_version","source_adapter","parse_status","created_at","text_available","html_available","text","html_raw","html_included"],"title":"已保存正文"},"SubscriptionOverview":{"properties":{"book_id":{"type":"string","title":"微信读书公众号标识","description":"微信读书公众号标识，格式为 MP_WXS_数字；与内容库 account_id 不同。"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"订阅名称"},"enabled":{"type":"boolean","title":"是否启用"},"subscription_status":{"type":"string","enum":["active","paused","cancelled"],"title":"订阅状态"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"取消订阅时间"},"automatic_not_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"最早自动采集时间"},"immediate_pending":{"type":"boolean","title":"待首次立即采集"},"has_saved_window":{"type":"boolean","title":"是否有保存的采集窗口","description":"保存的检查点可能属于已停止批次，不一定表示任务正在排队。"},"watermark":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"采集进度时间"},"last_result":{"anyOf":[{"$ref":"#/components/schemas/PullResult"},{"type":"null"}],"title":"最近执行结果"},"last_catchup_result":{"anyOf":[{"$ref":"#/components/schemas/PullResult"},{"type":"null"}],"title":"最近历史补拉结果"}},"type":"object","required":["book_id","name","enabled","subscription_status","cancelled_at","automatic_not_before","immediate_pending","has_saved_window","watermark","last_result","last_catchup_result"],"title":"单个订阅概览"},"SubscriptionsOverview":{"properties":{"total":{"type":"integer","title":"订阅总数"},"enabled":{"type":"integer","title":"已启用订阅数"},"disabled":{"type":"integer","title":"已关闭订阅数"},"paused":{"type":"integer","title":"暂停订阅数"},"cancelled":{"type":"integer","title":"已取消订阅数"},"immediate_pending":{"type":"integer","title":"待首次立即采集的订阅数"},"with_saved_window":{"type":"integer","title":"有采集窗口的订阅数"},"items":{"items":{"$ref":"#/components/schemas/SubscriptionOverview"},"type":"array","title":"结果条目"}},"type":"object","required":["total","enabled","disabled","paused","cancelled","immediate_pending","with_saved_window","items"],"title":"订阅汇总"},"TopicSearchRequest":{"properties":{"parse":{"type":"boolean","title":"是否解析正文","description":"是否解析选中文章的正文；要求 resolve_urls=true，默认关闭。","default":false},"save":{"type":"boolean","title":"是否保存结果","description":"是否将成功解析的正文写入内容库；要求 parse=true，默认关闭。","default":false},"max_articles":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"最多处理文章数","description":"正文阶段最多尝试的文章数，默认3篇；失败也计入尝试数。","default":3},"content_budget_seconds":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"正文处理时间预算（秒）","description":"正文阶段软预算；逐篇开始前检查，不中断在途请求","default":90},"keyword":{"type":"string","maxLength":64,"minLength":1,"title":"搜索关键词"},"pages":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"页数","default":1},"count":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"每页条数","default":15},"cursor":{"anyOf":[{"$ref":"#/components/schemas/SearchCursor"},{"type":"null"}],"title":"分页游标"},"request_limit":{"type":"integer","maximum":200.0,"minimum":1.0,"title":"上游请求次数预算","default":200},"resolve_urls":{"type":"boolean","title":"是否获取原文链接","default":true},"indices":{"anyOf":[{"items":{"type":"integer"},"type":"array","maxItems":400},{"type":"null"}],"title":"选择条目的序号","description":"选择搜索结果中的位置，序号从1开始；提供时覆盖 limit 的选取规则。"},"limit":{"type":"integer","maximum":400.0,"minimum":0.0,"title":"返回数量上限","default":15,"description":"未提供 indices 时，选择前多少条搜索结果获取原文链接；0 表示不选取任何条目获取原文链接。"},"force":{"type":"boolean","title":"是否跳过搜索避让限制","default":false,"description":"仅对话题搜索有效：显式跳过时段避让与刷新窗口次数限制，不取消请求预算。"}},"type":"object","required":["keyword"],"title":"话题搜索请求"},"UpdateSubscriptionRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"订阅名称","description":"新的订阅名称；与 enabled 至少提供一项。"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"是否启用","description":"false 暂停，true 恢复（包括已取消订阅）；恢复后等待正常时段。与 name 至少提供一项。"}},"additionalProperties":false,"type":"object","title":"订阅修改请求"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"错误字段位置"},"msg":{"type":"string","title":"校验错误说明"},"type":{"type":"string","title":"校验错误类型"},"input":{"title":"未通过校验的输入"},"ctx":{"type":"object","title":"校验上下文"}},"type":"object","required":["loc","msg","type"],"title":"参数校验错误详情"},"WereadProbeRunRequest":{"properties":{"keyword":{"type":"string","maxLength":32,"minLength":1,"title":"搜索关键词","default":"科技"},"article_url":{"type":"string","title":"微信文章链接","description":"微信公众号文章的完整链接，使用 https://mp.weixin.qq.com。"}},"type":"object","required":["article_url"],"title":"可选诊断请求"}}},"tags":[{"name":"公开解析与服务状态"},{"name":"库内文章与运行记录"},{"name":"公众号发现、注册与话题搜索"},{"name":"拉取、时间表与历史补拉"},{"name":"扫码、账号与保活管理"},{"name":"管理解析与导出"},{"name":"内部定时调度"},{"name":"底层解析与可选诊断"}]}