import "../base.api"
import "./agent.api"

type (
    // The data of agent base information | AgentBase信息
    AgentBaseInfo {
        Id        *string    `json:"id,optional"`
    }

    // The response data of agent base list | AgentBase列表数据
    AgentBaseListResp {
        BaseDataInfo

        // AgentBase list data | AgentBase列表数据
        Data AgentBaseListInfo `json:"data"`
    }

    // AgentBase list data | AgentBase列表数据
    AgentBaseListInfo {
        BaseListInfo

        // The API list data | AgentBase列表数据
        Data  []AgentBaseInfo  `json:"data"`
    }

    // Get agent base list request params | AgentBase列表请求参数
    AgentBaseListReq {
        PageInfo

        // q 
        Q  *string `json:"q,optional"`

        // a 
        A  *string `json:"a,optional"`

        // dataset_id 
        DatasetId  *string `json:"datasetId,optional"`
    }

    // AgentBase information response | AgentBase信息返回体
    AgentBaseInfoResp {
        BaseDataInfo

        // AgentBase information | AgentBase数据
        Data AgentBaseInfo `json:"data"`
    }
)

@server(
    jwt: Auth
    group: agent_base
    middleware: Authority
)

service Wechat {
    // Create agent base information | 创建AgentBase
    @handler createAgentBase
    post /agent_base/create (CreateDataInfoReq) returns (BaseDataInfo)

    // Update agent base information | 更新AgentBase
    @handler updateAgentBase
    post /agent_base/update (UpdateDataInfoReq) returns (BaseDataInfo)

    // Delete agent base information | 删除AgentBase信息
    @handler deleteAgentBase
    post /agent_base/delete (DeleteDataReq) returns (BaseDataInfo)

    // Get agent base list | 获取AgentBase列表
    @handler getAgentBaseList
    post /agent_base/list (DataListReq) returns (DataListResp)

    // Get agent base by ID | 通过ID获取AgentBase
    @handler getAgentBaseById
    post /agent_base (DataDetailReq) returns (DataDetailResp)
}
