feat: 增强 webhook 通知功能,支持手动禁用账号通知

- 添加手动禁用账号时的 webhook 通知功能
- 支持所有账号类型:Claude OAuth、Claude Console、Gemini
- 新增错误代码:MANUALLY_DISABLED 系列
- 更新 README.md 文档,添加完整的 webhook 配置说明
- 包含企业微信配置示例和测试方法

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
iRubbish
2025-08-14 18:28:48 +08:00
parent b33c659491
commit c9b0c3eb82
5 changed files with 191 additions and 28 deletions

View File

@@ -125,15 +125,18 @@ class WebhookNotifier {
const errorCodes = {
'claude-oauth': {
unauthorized: 'CLAUDE_OAUTH_UNAUTHORIZED',
error: 'CLAUDE_OAUTH_ERROR'
error: 'CLAUDE_OAUTH_ERROR',
disabled: 'CLAUDE_OAUTH_MANUALLY_DISABLED'
},
'claude-console': {
blocked: 'CLAUDE_CONSOLE_BLOCKED',
error: 'CLAUDE_CONSOLE_ERROR'
error: 'CLAUDE_CONSOLE_ERROR',
disabled: 'CLAUDE_CONSOLE_MANUALLY_DISABLED'
},
gemini: {
error: 'GEMINI_ERROR',
unauthorized: 'GEMINI_UNAUTHORIZED'
unauthorized: 'GEMINI_UNAUTHORIZED',
disabled: 'GEMINI_MANUALLY_DISABLED'
}
}