basePath: /api definitions: handler.AccountTokenResponse: properties: token: type: string type: object handler.ChangePasswordRequest: properties: new_password: example: newpass123 minLength: 6 type: string old_password: example: oldpass type: string required: - new_password - old_password type: object handler.CreateAccountRequest: properties: session: example: access-token type: string required: - session type: object handler.CronRequest: properties: account_ids: example: '[1,2]' type: string cron_expr: example: 0 8 * * * type: string name: example: 每日签到 type: string status: example: 1 type: integer task_type: example: checkin type: string required: - cron_expr - name type: object handler.LoginRequest: properties: password: type: string username: example: admin type: string required: - password - username type: object handler.UpdateAccountRequest: properties: session: example: access-token type: string type: object handler.UpdateAccountStatusRequest: properties: status: example: 1 type: integer required: - status type: object handler.VerifyRequest: properties: session: example: access-token type: string required: - session type: object model.Account: properties: balance: type: number created_at: format: date-time type: string id: type: integer last_checkin: format: date-time type: string last_result: type: string role: type: integer status: type: integer updated_at: format: date-time type: string user_id: type: integer username: type: string type: object model.CheckinLog: properties: account_id: type: integer created_at: format: date-time type: string id: type: integer message: type: string success: type: boolean type: object model.CronTask: properties: account_ids: type: string created_at: format: date-time type: string cron_expr: type: string id: type: integer last_run: format: date-time type: string name: type: string next_run: format: date-time type: string status: type: integer task_type: type: string type: object response.Response: properties: code: type: integer data: {} message: type: string type: object service.CheckinLogSummary: properties: logs: items: $ref: '#/definitions/model.CheckinLog' type: array today_checkin_account_count: type: integer type: object service.SessionInfo: properties: group: type: string role: type: integer status: type: integer user_id: type: integer username: type: string type: object host: localhost:8080 info: contact: {} description: AnyRouter 签到中台管理系统 title: AnyRouter 管理后台 API version: "1.0" paths: /accounts: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: items: $ref: '#/definitions/model.Account' type: array type: object security: - BearerAuth: [] summary: 获取所有账号 tags: - 账号管理 post: consumes: - application/json parameters: - description: 账号参数 in: body name: request required: true schema: $ref: '#/definitions/handler.CreateAccountRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.Account' type: object security: - BearerAuth: [] summary: 添加 AnyRouter 账号 tags: - 账号管理 /accounts/{id}: delete: parameters: - description: 账号ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 删除账号 tags: - 账号管理 put: consumes: - application/json parameters: - description: 账号ID in: path name: id required: true type: integer - description: 账号参数 in: body name: request required: true schema: $ref: '#/definitions/handler.UpdateAccountRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.Account' type: object security: - BearerAuth: [] summary: 更新账号信息 tags: - 账号管理 /accounts/{id}/checkin: post: parameters: - description: 账号ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 手动执行签到 tags: - 账号管理 /accounts/{id}/refresh: post: parameters: - description: 账号ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.Account' type: object security: - BearerAuth: [] summary: 刷新账号信息 tags: - 账号管理 /accounts/{id}/status: put: consumes: - application/json parameters: - description: 账号ID in: path name: id required: true type: integer - description: 账号状态 in: body name: request required: true schema: $ref: '#/definitions/handler.UpdateAccountStatusRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.Account' type: object security: - BearerAuth: [] summary: 更新账号状态 tags: - 账号管理 /accounts/{id}/token: get: parameters: - description: 账号ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/handler.AccountTokenResponse' type: object security: - BearerAuth: [] summary: 读取账号已保存的访问令牌 tags: - 账号管理 /accounts/verify: post: consumes: - application/json parameters: - description: 访问令牌 in: body name: request required: true schema: $ref: '#/definitions/handler.VerifyRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/service.SessionInfo' type: object summary: 验证 AnyRouter 访问令牌有效性 tags: - 账号管理 /anyrouter/{path}: get: consumes: - application/json parameters: - description: 目标路径 in: path name: path required: true type: string - description: Bearer {access_token} in: header name: Authorization required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object summary: 代理转发请求到 AnyRouter tags: - 代理 /auth/login: post: consumes: - application/json parameters: - description: 登录参数 in: body name: request required: true schema: $ref: '#/definitions/handler.LoginRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: additionalProperties: type: string type: object type: object summary: 用户登录 tags: - 认证 /auth/password: put: consumes: - application/json parameters: - description: 密码参数 in: body name: request required: true schema: $ref: '#/definitions/handler.ChangePasswordRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 修改当前用户密码 tags: - 认证 /auth/profile: get: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 获取当前用户信息 tags: - 认证 /config/{category}: get: parameters: - description: 配置分类 enum: - telegram - system in: path name: category required: true type: string produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: additionalProperties: type: string type: object type: object security: - BearerAuth: [] summary: 获取指定分类的配置 tags: - 系统配置 put: consumes: - application/json parameters: - description: 配置分类 enum: - telegram - system in: path name: category required: true type: string - description: 配置键值对 in: body name: request required: true schema: additionalProperties: type: string type: object produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 更新指定分类的配置 tags: - 系统配置 /config/telegram/test: post: produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 发送 Telegram 测试消息(使用最近成功签到记录) tags: - 系统配置 /cron: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: items: $ref: '#/definitions/model.CronTask' type: array type: object security: - BearerAuth: [] summary: 获取所有定时任务 tags: - 定时任务 post: consumes: - application/json parameters: - description: 任务参数 in: body name: request required: true schema: $ref: '#/definitions/handler.CronRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.CronTask' type: object security: - BearerAuth: [] summary: 创建定时任务 tags: - 定时任务 /cron/{id}: delete: parameters: - description: 任务ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 删除定时任务 tags: - 定时任务 put: consumes: - application/json parameters: - description: 任务ID in: path name: id required: true type: integer - description: 任务参数 in: body name: request required: true schema: $ref: '#/definitions/handler.CronRequest' produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/model.CronTask' type: object security: - BearerAuth: [] summary: 更新定时任务 tags: - 定时任务 /cron/{id}/trigger: post: parameters: - description: 任务ID in: path name: id required: true type: integer produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/response.Response' security: - BearerAuth: [] summary: 立即触发执行定时任务 tags: - 定时任务 /logs: get: produces: - application/json responses: "200": description: OK schema: allOf: - $ref: '#/definitions/response.Response' - properties: data: $ref: '#/definitions/service.CheckinLogSummary' type: object security: - BearerAuth: [] summary: 获取签到日志列表与今日账号统计 tags: - 日志 securityDefinitions: BearerAuth: in: header name: Authorization type: apiKey swagger: "2.0"