Skip to content

zentao-api / ModuleAction

Interface: ModuleAction

禅道模块中的单个 API 动作定义。

Properties

PropertyTypeDescription
description?string动作说明。
display?string面向用户展示的动作名称。
methodModuleActionMethodHTTP 方法。
nameModuleActionName动作名称,例如 listgetclose
pagerGetter?string | ModuleActionPagerGetterMap | ((data, params) => Pager)从原始响应中提取分页信息的位置或函数。
params?ModuleActionParam[]查询参数定义。
pathstringAPI 路径模板,可包含 {productID} 等路径参数。
pathParams?Record<string, string | Omit<ModuleActionParam, "name">>路径参数定义;字符串为说明,对象可携带默认值和可选项。
render?string | ModuleActionResultRender | Record<ModuleActionResultRenderType, ModuleActionResultRender>供上层应用使用的渲染配置。
requestBody?ModuleActionRequestBody请求体定义。
resultGetter?string | Record<string, string> | ((data, params) => unknown)从原始响应中提取业务数据的位置或函数。
resultTypeModuleActionResultType结果形态。
typeModuleActionType动作类型,决定高阶 request 的路径/参数解析策略。

Released under the MIT License.