49 lines
2.8 KiB
JSON
49 lines
2.8 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"$id": "https://openclaw.local/account-manager/account-record.schema.json",
|
||
"title": "AccountRecord",
|
||
"description": "account-manager account get / pick-web / list 返回的单条账号对象(v2 schema)",
|
||
"type": "object",
|
||
"required": ["id", "platform_key", "account_label", "environment", "role", "status", "session_status"],
|
||
"properties": {
|
||
"id": { "type": "integer", "description": "账号主键" },
|
||
"platform_key": { "type": "string", "description": "平台唯一键,如 maersk、deepseek" },
|
||
"account_label": { "type": "string", "description": "人可读名称" },
|
||
"login_id": { "type": "string", "description": "登录标识(email/phone/username/customer_code)" },
|
||
"login_id_type": { "type": "string", "enum": ["email", "username", "phone", "customer_code", "api_account", "unknown"] },
|
||
"tenant_id": { "type": "string", "description": "租户/项目标识" },
|
||
"environment": { "type": "string", "enum": ["simulator", "staging", "production", "test"] },
|
||
"role": { "type": "string", "description": "booking / tracking / admin / sales / api / default" },
|
||
"provider_code": { "type": "string", "description": "供应商代码" },
|
||
"profile_dir": { "type": "string", "description": "Playwright 用户数据目录绝对路径" },
|
||
"url": { "type": "string", "description": "账号默认入口 URL" },
|
||
"status": { "type": "string", "enum": ["active", "disabled", "needs_review"] },
|
||
"session_status": { "type": "string", "enum": ["unknown", "likely_valid", "needs_login", "expired"] },
|
||
"last_used_at": { "type": ["string", "null"], "description": "最近使用时间 ISO8601" },
|
||
"last_login_check_at": { "type": ["string", "null"] },
|
||
"last_error_code": { "type": "string" },
|
||
"last_error_message": { "type": "string" },
|
||
"created_at": { "type": ["string", "null"], "description": "创建时间 ISO8601" },
|
||
"updated_at": { "type": ["string", "null"], "description": "更新时间 ISO8601" },
|
||
"credentials": {
|
||
"type": "array",
|
||
"description": "关联凭据(仅 account get --with-credentials 时返回)",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": { "type": "integer" },
|
||
"credential_label": { "type": "string" },
|
||
"credential_type": { "type": "string" },
|
||
"secret_storage": { "type": "string" },
|
||
"secret_ref": { "type": "string" },
|
||
"secret_mask": { "type": "string" },
|
||
"status": { "type": "string" }
|
||
}
|
||
}
|
||
},
|
||
"lease_token": { "type": "string", "description": "仅 pick-web --lease 时返回" },
|
||
"lease_expires_at": { "type": "string", "description": "仅 pick-web --lease 时返回" }
|
||
},
|
||
"additionalProperties": true
|
||
}
|