syntax = "proto2";

package MessageCmd;

//option optimize_for = LITE_RUNTIME;

option java_package = "com.miaole.live.protocol.request";
option java_outer_classname = "MessageCmd";

//获得最新一条消息 返回:MessageResult.MessageListResult
message getLastNewMsg {
	repeated int32 tabTypes = 1;//根据类型获取最后一条消息
	optional int32 origin = 2; // 请求来源，暂时只pc使用，值为1
}

//获得新消息数量 返回:MessageResult.NewMessageResult
//message getNewMsgInfo {
//	optional bool clearNew = 1;//就否清除消息条数
//	optional int32 origin = 2; // 请求来源，暂时只pc使用，值为1
//}


//获得某标签内的新消息 返回:MessageResult.MessageListResult
//该接口是在 getNewMsgInfo  返回的数据中的newNum大于0时才使用, 取得数据后把newNum设置为0
message getNewMsgList {
	optional int32 msgNum = 1;//获得消息条数
	optional int32 tabType = 2;//消息标签类型
	optional int32 origin = 3; // 请求来源，暂时只pc使用，值为1
}

//获得某标签内历史的消息 返回:MessageResult.MessageListResult
message getMsgList {
      optional string lastId = 1;// 最后一条dataID 没有则传空字符串
      optional int32 msgNum = 2;//获得消息条数
      optional int32 tabType = 3;//消息标签类型
      optional int32 origin = 4; // 请求来源，暂时只pc使用，值为1
}

//读取消息
//message readMsg {
//	optional string id = 1;//data ID
//}

//操作消息
message opMsg {
      optional string id = 1;//data ID
      optional string msgId = 2;//消息ID
      optional string receiveId = 3;//消息接收方ID
      optional string senderId = 4;//消息接发送方ID
      optional string thirdpartyId = 5;//第三方Id
      optional int32 status = 6;//操作状态 IMsgStatus
}

//删除
message deleteMsg {
	repeated string id = 1;//data ID
}

//删除所属标签类型的所有消息
message deleteAll4TableType {
	optional int32 tabType = 1;//消息标签类型
}

//获得已标记为删除的消息:MessageResult.MessageDelIDsResult
message getDelMsgList {

}

//获得需要更新的消息 返回:MessageResult.MessageListResult
message getNeedUpdateMsgList {

}

//根据消息ID获取数据 返回:MessageResult.MessageListResult
message getMsg4IdList {
     repeated string idList = 1;//data ID
}
//获取宠物消息提示  返回:MessageResult.PetTipLst
message getPetTip{
}
//更新提示已读
message updateTipReaded{
    
    optional string messageId=1;//
}

//标记处理消息
message handelMsg {
	optional string msgId=1;//聊天消息ID
	optional string otherId = 2;//对方的用户ID
}

// 一键读取所有未读消息
message updateAllUnReadMsg {
    optional string userId = 1; // 自己的用户ID
}

//发送IM私聊消息 消息体内容参考 https://cloud.tencent.com/document/product/269/2720#.E7.A6.BB.E7.BA.BF.E6.8E.A8.E9.80.81-offlinepushinfo-.E8.AF.B4.E6.98.8E
message sendMsg {
	optional string toUserId = 1;//接收用户
	optional string msgBody = 2;//消息体内容
	optional string offlinePushInfo = 3;//离线推送信息配置
}

//发送IM群组消息
message sendGroupMsg {
	optional string roomId = 1;//房间ID
	optional string msgBody = 2;//消息体内容
	optional string offlinePushInfo = 3;//离线推送信息配置
}

//发送随机私聊文案内容
message sendRandomPrivateMsg {
	optional string toUserId = 1;//接收用户
}

//获得消息是否已确认 返回已确认的消息ID数组 CommonResult.StringArrayResult
message getMsgConfirmStatus {
	repeated string msgIdList = 1;//消息ID数组
	repeated string msgDateList = 2;//消息日期数组 格式：YYYY-MM-DD hh:mm:ss
}

//获取IM消息状态
message getImMessageStatus {
	repeated string msgId = 1;         //消息ID集合
}

//发送IM奖励
message sendImMessageReward {
	optional string msgId = 1;         //消息ID
	optional int32 msgType = 2;         //im消息类型
	optional int32 rewardType = 3; //奖励类型
	optional string anchorId = 4;     // 主播id
}


//破冰表情包 返回 MessageResult.BreakIceEmoticonsInfo
message getBreakIceEmoticons {

}
// 触发特效配置文案
message listTriggerEffectText {
	required int32 type = 1; // 1 房间公屏 2 IM聊天
}

//设置房间清屏时间
message setCleanRoomMsgDate {
	optional string roomId = 1;//房间ID
}

// 发送弹幕消息
message sendBulletChatMsg {
	optional string copyWriting = 1; // 文案
	optional string roomId = 2; // 房间ID
	optional string bubbleId = 3; // 弹幕气泡ID
}
