import "../base.api"

type (
    // The response data of chatroom member information | ChatroomMember信息
    ChatroomMemberInfo {

        // 名称 
        Wxid  *string `json:"wxid,optional"`

        // 群组
        ChatRoom *string `json:"chatRoom,optional"`

        // 属主Wxid
        OwnerWxid *string `json:"ownerWxid,optional"`

        // 账号
        Account *string `json:"account,optional"`
    }

    // The response data of chatroom member list | ChatroomMember列表数据
    ChatroomMemberListResp {
        BaseDataInfo

        // chatroom member list data | chatroom member 列表数据
        Data ChatroomMemberListInfo `json:"data"`
    }

    // chatroom member list data | chatroom member列表数据
    ChatroomMemberListInfo {
        BaseListInfo

        // The API list data | chatroom member列表数据
        Data  []ChatroomMemberInfo  `json:"data"`
    }

    // Get chatroom member list request params | ChatroomMember列表请求参数
    ChatroomMemberListReq {
        PageInfo

        // 属主Wxid
        OwnerWxid *string `json:"ownerWxid,optional"`

        // 群组
        ChatRoom *string `json:"chatRoom,optional"`

        
    }

    // chatroom member information response | ChatroomMember信息返回体
    ChatroomMemberInfoResp {
        BaseDataInfo

        // Server information | Server数据
        Data ChatroomMemberInfo `json:"data"`
    }
)

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

service Wechat {

    // Get chatroom member list | 获取ChatroomMember列表
    @handler getChatroomMemberList
    post /chatroom_member/list (ChatroomMemberListReq) returns (ChatroomMemberListResp)
}
