feat(platform): 新增自建应用子域 API/Service 层
新增 api/platform/ 子包(对齐 api/sealai/ 结构): - platform_api: list_platforms(DataLink Platform 列表) - easo_client: EasoClient + get_easo_client()(EASO Bearer JWT 认证) - workflow_api: list_workflows / get_workflow_stats / get_workflow_charge - schemas: Platform / Workflow* 模型(从全局 schemas.py 独立出来) 新增 services/platform/ 子包: - list_platforms / list_platforms_cmd - list_workflows / get_workflow_stats / get_workflow_charge 及 _cmd 变体 全局 api/schemas.py 清理 platform/workflow 相关模型,只保留通用结构。 未实现子模块(entity/page/card/variable/log)在各层以 README 预留。
This commit is contained in:
1 parent
f7c065f59b
commit
474349e7e4
14 files changed
+644
No files matched your search
@@ -0,0 +1,16 @@
|
||||
"""自建应用(DataLink Platform)API 调用封装"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from ekb_cli.api import EkbClient
|
||||
from ekb_cli.api.platform.schemas import Platform
|
||||
|
||||
|
||||
def list_platforms(client: EkbClient) -> List[Platform]:
|
||||
"""获取企业下所有启用的自建应用。
|
||||
|
||||
对应接口:GET /api/v2/datalink/platform/search?scope=enable
|
||||
响应结构:{"items": [...]}(非 EkbResponse 包装)
|
||||
"""
|
||||
raw = client.get("/v2/datalink/platform/search", scope="enable")
|
||||
return [Platform.model_validate(item) for item in raw.get("items", [])]
|
||||
Reference in new issue
Block a user