syntax = "proto3";

package bilibili.broadcast.message.im;

import "google/protobuf/empty.proto";

// 
service Notify {
    // 
    rpc WatchNotify (google.protobuf.Empty) returns (stream NotifyRsp);
}

// 
enum CmdId {
    // 
    EN_CMD_ID_INVALID = 0;
    // 
    EN_CMD_ID_MSG_NOTIFY = 1;
    // 
    EN_CMD_ID_KICK_OUT = 2;
}

// 
message Msg {
    // 
    int64 sender_uid = 1;
    // 
    int32 receiver_type = 2;
    // 
    int64 receiver_id = 3;
    // 
    int64 cli_msg_id = 4;
    // 
    int32 msg_type = 5;
    // 
    string content = 6;
    // 
    int64 msg_seqno = 7;
    // 
    int64 timestamp = 8;
    // 
    repeated int64 at_uids = 9;
    // 
    repeated int64 recver_ids = 10;
    // 
    int64 msg_key = 11;
    // 
    int32 msg_status = 12;
    // 
    bool sys_cancel = 13;
    // 
    int32 is_multi_chat = 14;
    // 
    int64 withdraw_seqno = 15;
    // 
    string notify_code = 16;
    // 
    int32 msg_source = 17;
}

// 
message NotifyInfo {
    // 
    int32 msg_type = 1;
    // 
    int64 talker_id = 2;
    // 
    int32 session_type = 3;
}

// 
message NotifyRsp {
    // 
    int64 uid = 1;
    // 
    int64 cmd = 2;
    // 
    bytes payload = 3;
    // 
    PLType payload_type = 4;
}

// 
enum PLType {
    // 
    EN_PAYLOAD_NORMAL = 0;
    // 
    EN_PAYLOAD_BASE64 = 1;
}

// 
message ReqServerNotify {
    // 
    int64 lastest_seqno = 1;
    // 
    Msg instant_msg = 2;
    // 
    NotifyInfo notify_info = 3;
}

