diff --git a/grpc_api/bilibili/app/playeronline/v1/playeronline.proto b/grpc_api/bilibili/app/playeronline/v1/playeronline.proto index 6400f21..96172f1 100644 --- a/grpc_api/bilibili/app/playeronline/v1/playeronline.proto +++ b/grpc_api/bilibili/app/playeronline/v1/playeronline.proto @@ -5,7 +5,7 @@ package bilibili.app.playeronline.v1; // 在线人数 service PlayerOnline { // 获取在线人数 - rpc GetPlayerOnline (PlayerOnlineReq) returns (PlayerOnlineReply); + rpc PlayerOnline (PlayerOnlineReq) returns (PlayerOnlineReply); } // 获取在线人数-请求 diff --git a/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto b/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto index 444f2ec..981f2e4 100644 --- a/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto +++ b/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.dynamic.interfaces.feed.v1; +package bilibili.main.dynamic.feed.v1; import "bilibili/dynamic/common.proto"; diff --git a/grpc_api/bilibili/im/interfaces/v1/im.proto b/grpc_api/bilibili/im/interfaces/v1/im.proto index f1794f0..029c181 100644 --- a/grpc_api/bilibili/im/interfaces/v1/im.proto +++ b/grpc_api/bilibili/im/interfaces/v1/im.proto @@ -4,18 +4,16 @@ package bilibili.im.interfaces.v1; import "bilibili/im/type/im.proto"; -//私信 +// 私信 service ImInterface { // 发送消息 rpc SendMsg (ReqSendMsg) returns (RspSendMsg); - // 同步关系 rpc SyncRelation (ReqRelationSync) returns (RspRelationSync); // 确认同步进度 rpc SyncAck (ReqSyncAck) returns (RspSyncAck); // 同步版本拉取消息 rpc SyncFetchSessionMsgs (ReqSessionMsg) returns (RspSessionMsg); - // 拉取会话记录列表 rpc GetSessions (ReqGetSessions) returns (RspSessions); // 拉取新消息 @@ -46,25 +44,46 @@ service ImInterface { rpc BatchRmSessions (ReqBatRmSess) returns (DummyRsp); // 拉取最近私信分享列表 rpc ShareList (ReqShareList) returns (RspShareList); - // rpc SpecificSingleUnread (ReqSpecificSingleUnread) returns (RspSpecificSingleUnread); // rpc GetSpecificSessions (ReqGetSpecificSessions) returns (RspSessions); + // + rpc GetLiveInfo(ReqLiveInfo) returns (RspLiveInfo); + // + rpc GetTotalUnread(ReqTotalUnread) returns (RspTotalUnread); + // + rpc ShowClearUnreadUI(ReqShowClearUnreadUI) returns (RspShowClearUnreadUI); + // + rpc CloseClearUnreadUI(ReqCloseClearUnreadUI) returns (RspCloseClearUnreadUI); + // + rpc UpdateTotalUnread(ReqUpdateTotalUnread) returns (RspUpdateTotalUnread); } -// 发送消息-请求 -message ReqSendMsg { - // 消息内容 - bilibili.im.type.Msg msg = 1; +// 空请求 +message DummyReq { // - string cookie = 2; - // - string cookie2 = 3; - // - int32 error_code = 4; - // - string dev_id = 5; + uint32 idl = 1; +} + +// 空响应 +message DummyRsp { + reserved 1; +} + +// +enum ENUM_FOLD { + FOLD_NO = 0; // + FOLD_YES = 1; // + FOLD_UNKNOWN = 2; // +} + +// +enum ENUM_UNREAD_TYPE{ + UNREAD_TYPE_ALL = 0; // + UNREAD_TYPE_FOLLOW = 1; // + UNREAD_TYPE_UNFOLLOW = 2; // + UNREAD_TYPE_DUSTBIN = 3; // } // 表情资源信息 @@ -80,77 +99,54 @@ message EmotionInfo { string gif_url = 4; } -// 发送消息-响应 -message RspSendMsg { +// +message MsgDetail { // - uint64 msg_key = 1; - // 表情资源信息 - repeated EmotionInfo e_infos = 2; + int64 msg_key = 1; // - string msg_content = 3; - // - bilibili.im.type.KeyHitInfos key_hit_infos = 4; + int64 seqno = 2; } -// 同步关系-请求 -message ReqRelationSync { - // 客户端当前seqno - uint64 client_relation_oplog_seqno = 1; +// +message MsgFeedUnreadRsp { + // + map unread = 1; } -// 同步关系-响应 -message RspRelationSync { +// 更新应援团小助手消息已拉取进度-请求 +message ReqAckAssisMsg { // - int32 full = 1; - // 增量日志 - repeated bilibili.im.type.RelationLog relation_logs = 2; - // 全量列表 - repeated bilibili.im.type.FriendRelation friend_list = 3; - // 服务器端最大的relation seqno - uint64 server_relation_oplog_seqno = 4; - // 全量列表 - repeated bilibili.im.type.GroupRelation group_list = 5; + uint64 ack_seqno = 1; } -// 确认同步进度-请求 -message ReqSyncAck { +// 拉取已读消息-请求 +message ReqAckSessions { // - uint64 client_seqno = 1; + uint64 begin_ts = 1; + // + uint32 end_ts = 2; + // + uint32 size = 3; } -// 确认同步进度-响应 -message RspSyncAck {} +// 批量删除会话-请求 +message ReqBatRmSess { -// 同步版本拉取消息-请求 -message ReqSessionMsg { +} + +// +message ReqCloseClearUnreadUI { + +} + +// +message ReqGetMsg { // - uint64 talker_id = 1; + int64 talker_id = 1; // int32 session_type = 2; // - uint64 end_seqno = 3; - // - uint64 begin_seqno = 4; - // - int32 size = 5; - // - int32 order = 6; - // - string dev_id = 7; -} - -// 同步版本拉取消息-响应 -message RspSessionMsg { - // - repeated bilibili.im.type.Msg messages = 1; - // - int32 has_more = 2; - // - uint64 min_seqno = 3; - // - uint64 max_seqno = 4; - // 表情资源信息 - repeated EmotionInfo e_infos = 5; + repeated MsgDetail msg_detail = 3; } // 拉取会话记录列表-请求 @@ -175,6 +171,28 @@ message ReqGetSessions { uint32 lessons_mode = 9; } +// -请求 +message ReqGetSpecificSessions { + // 具体会话详情 + repeated SimpleSession talker_sessions = 1; +} + +// 应援团消息助手-请求 +message ReqGroupAssisMsg { + // + uint64 client_seqno = 1; + // + uint32 size = 2; +} + +// +message ReqLiveInfo { + // + int64 uid = 1; + // + int64 talker_id = 2; +} + // 拉取新消息-请求 message ReqNewSessions { // @@ -187,47 +205,10 @@ message ReqNewSessions { uint32 lessons_mode = 4; } -// 拉取已读消息-请求 -message ReqAckSessions { - // - uint64 begin_ts = 1; - // - uint32 end_ts = 2; - // - uint32 size = 3; -} - -// 拉取消息-响应 -message RspSessions { - // - repeated bilibili.im.type.SessionInfo session_list = 1; - // - uint32 has_more = 2; - // 标记反垃圾会话是否在清理中 - bool anti_disturb_cleaning = 3; - // 当session_list为空时,会返回该字段用于判断通讯录是否为空,1表示空,0表示非空 - int32 is_address_list_empty = 4; -} - -// 更新已读进度-请求 -message ReqUpdateAck { - // 聊天对象uid,可以为用户id或者为群id - uint64 talker_id = 1; - // 会话类型 - uint32 session_type = 2; - // 已读的最大seqno - uint64 ack_seqno = 3; -} - -// 置顶聊天-请求 -message ReqSetTop { - // - uint64 talker_id = 1; - // - uint32 session_type = 2; - // - // 0:置顶 1:取消置顶 - uint32 op_type = 3; +// 同步关系-请求 +message ReqRelationSync { + // 客户端当前seqno + uint64 client_relation_oplog_seqno = 1; } // 删除会话记录-请求 @@ -238,104 +219,18 @@ message ReqRemoveSession { uint32 session_type = 2; } -// 空响应 -message DummyRsp { - reserved 1; -} - -// -enum SESSION_TYPE { // - UNKNOWN = 0; // - UN_FOLD_SESSION = 1; // - UN_FOLLOW_SINGLE_SESSION = 2; // - MY_GROUP_SESSION = 3; // - ALL_SESSION = 4; // -} - -// -enum ENUM_FOLD { - FOLD_NO = 0; // - FOLD_YES = 1; // - FOLD_UNKNOWN = 2; // -} - -// -enum ENUM_UNREAD_TYPE{ - UNREAD_TYPE_ALL = 0; // - UNREAD_TYPE_FOLLOW = 1; // - UNREAD_TYPE_UNFOLLOW = 2; // -} - -// 未读私信数-请求 -message ReqSingleUnread { +// 发送消息-请求 +message ReqSendMsg { + // 消息内容 + bilibili.im.type.Msg msg = 1; // - uint32 unread_type = 1; + string cookie = 2; // - uint32 show_unfollow_list = 2; -} - -// 未读私信数-响应 -message RspSingleUnread { - // 未关注用户私信数 - uint64 unfollow_unread = 1; - // 已关注用户私信数 - uint64 follow_unread = 2; - // 未关注人列表是否有新业务通知 - uint32 unfollow_push_msg = 3; -} - -// -message SimpleSession { - // 聊天对象uid,可以为用户id或者为群id - uint64 talker_id = 1; - // 会话类型 - uint32 session_type = 2; -} - -// -请求 -message ReqSpecificSingleUnread { - // 具体会话详情 - repeated SimpleSession talker_sessions = 1; -} - -// -响应 -message RspSpecificSingleUnread { - // key -> 用户uid, value ->未读数 - map talkerUnreadCnt = 1; - // 总未读数 - uint64 allUnreadCnt = 2; -} - -// -请求 -message ReqGetSpecificSessions { - // 具体会话详情 - repeated SimpleSession talker_sessions = 1; -} - -// 空请求 -message DummyReq { + string cookie2 = 3; // - uint32 idl = 1; -} - -// 我创建的应援团未读数-响应 -message RspMyGroupUnread { - // 未读消息数 - uint32 unread_count = 1; -} - -// 应援团消息助手-请求 -message ReqGroupAssisMsg { + int32 error_code = 4; // - uint64 client_seqno = 1; - // - uint32 size = 2; -} - -// 更新应援团小助手消息已拉取进度-请求 -message ReqAckAssisMsg { - // - uint64 ack_seqno = 1; + string dev_id = 5; } // 拉取会话详情-请求 @@ -354,19 +249,287 @@ message ReqSessionDetails { repeated ReqSessionDetail sess_ids = 1; } +// 同步版本拉取消息-请求 +message ReqSessionMsg { + // + uint64 talker_id = 1; + // + int32 session_type = 2; + // + uint64 end_seqno = 3; + // + uint64 begin_seqno = 4; + // + int32 size = 5; + // + int32 order = 6; + // + string dev_id = 7; +} + +// 置顶聊天-请求 +message ReqSetTop { + // + uint64 talker_id = 1; + // + uint32 session_type = 2; + // + // 0:置顶 1:取消置顶 + uint32 op_type = 3; +} + +// 拉取最近私信分享列表-请求 +message ReqShareList { + // 分页大小 最大20 + int32 size = 1; +} + +// +message ReqShowClearUnreadUI { + // + int32 unread_type = 1; + // + int32 show_unfollow_list = 2; + // + int32 show_dustbin = 4; +} + +// 未读私信数-请求 +message ReqSingleUnread { + // + int32 unread_type = 1; + // + int32 show_unfollow_list = 2; + // + int64 uid = 3; + // + int32 show_dustbin = 4; +} + +// -请求 +message ReqSpecificSingleUnread { + // 具体会话详情 + repeated SimpleSession talker_sessions = 1; +} + +// 确认同步进度-请求 +message ReqSyncAck { + // + uint64 client_seqno = 1; +} + +// +message ReqTotalUnread { + // + int32 unread_type = 1; + // + int32 show_unfollow_list = 2; + // + int64 uid = 3; + // + int32 show_dustbin = 4; + // + int32 singleunread_on = 5; + // + int32 msgfeed_on = 6; + // + int32 sysup_on = 7; +} + +// 更新已读进度-请求 +message ReqUpdateAck { + // 聊天对象uid,可以为用户id或者为群id + uint64 talker_id = 1; + // 会话类型 + uint32 session_type = 2; + // 已读的最大seqno + uint64 ack_seqno = 3; +} + +// +message ReqUpdateIntercept { + // + int64 uid = 1; + // + int64 talker_id = 2; + // + int32 status = 3; +} + +// +message ReqUpdateTotalUnread { + +} + +// +message RspCloseClearUnreadUI { + +} + +// +message RspGetMsg { + // + repeated bilibili.im.type.Msg msg = 1; +} + +// +message RspLiveInfo { + // + int64 live_status = 1; + // + string jump_url = 2; +} + +// 我创建的应援团未读数-响应 +message RspMyGroupUnread { + // 未读消息数 + uint32 unread_count = 1; +} + +// 同步关系-响应 +message RspRelationSync { + // + int32 full = 1; + // 增量日志 + repeated bilibili.im.type.RelationLog relation_logs = 2; + // 全量列表 + repeated bilibili.im.type.FriendRelation friend_list = 3; + // 服务器端最大的relation seqno + uint64 server_relation_oplog_seqno = 4; + // 全量列表 + repeated bilibili.im.type.GroupRelation group_list = 5; +} + +// 发送消息-响应 +message RspSendMsg { + // + uint64 msg_key = 1; + // 表情资源信息 + repeated EmotionInfo e_infos = 2; + // + string msg_content = 3; + // + bilibili.im.type.KeyHitInfos key_hit_infos = 4; +} + // 批量拉取会话详情-响应 message RspSessionDetails { // 会话详情列表 repeated bilibili.im.type.SessionInfo sess_infos = 1; } -// 批量删除会话-请求 -message ReqBatRmSess {} +// 同步版本拉取消息-响应 +message RspSessionMsg { + // + repeated bilibili.im.type.Msg messages = 1; + // + int32 has_more = 2; + // + uint64 min_seqno = 3; + // + uint64 max_seqno = 4; + // 表情资源信息 + repeated EmotionInfo e_infos = 5; +} -// 拉取最近私信分享列表-请求 -message ReqShareList { - // 分页大小 最大20 - int32 size = 1; +// 拉取消息-响应 +message RspSessions { + // + repeated bilibili.im.type.SessionInfo session_list = 1; + // + uint32 has_more = 2; + // 标记反垃圾会话是否在清理中 + bool anti_disturb_cleaning = 3; + // 当session_list为空时,会返回该字段用于判断通讯录是否为空,1表示空,0表示非空 + int32 is_address_list_empty = 4; + // + map system_msg = 5; + // + bool show_level = 6; +} + +// 拉取最近私信分享列表-响应 +message RspShareList { + // 最近会话列表 + repeated ShareSessionInfo session_list = 1; + // + int32 IsAddressListEmpty = 2; +} + +// +message RspShowClearUnreadUI { + // + bool display = 1; + // + string text = 2; +} + +// 未读私信数-响应 +message RspSingleUnread { + // 未关注用户私信数 + uint64 unfollow_unread = 1; + // 已关注用户私信数 + uint64 follow_unread = 2; + // 未关注人列表是否有新业务通知 + uint32 unfollow_push_msg = 3; + // + int32 dustbin_push_msg = 4; + // + int64 dustbin_unread = 5; +} + +// -响应 +message RspSpecificSingleUnread { + // key -> 用户uid, value ->未读数 + map talkerUnreadCnt = 1; + // 总未读数 + uint64 allUnreadCnt = 2; +} + +// 确认同步进度-响应 +message RspSyncAck { + +} + +// +message RspTotalUnread { + // + SessionSingleUnreadRsp session_single_unread = 1; + // + MsgFeedUnreadRsp msg_feed_unread = 2; + // + SysMsgInterfaceLastMsgRsp sys_msg_interface_last_msg = 3; + // + int32 total_unread = 4; +} + +// +message RspUpdateTotalUnread { + +} + +// +enum SESSION_TYPE { // + UNKNOWN = 0; // + UN_FOLD_SESSION = 1; // + UN_FOLLOW_SINGLE_SESSION = 2; // + MY_GROUP_SESSION = 3; // + ALL_SESSION = 4; // + DUSTBIN_SESSION = 5; // +} + +// +message SessionSingleUnreadRsp { + // + int64 unfollow_unread = 1; + // + int64 follow_unread = 2; + // + int32 unfollow_push_msg = 3; + // + int32 dustbin_push_msg = 4; + // + int64 dustbin_unread = 5; } // 会话信息,用于私信分享 @@ -382,10 +545,58 @@ message ShareSessionInfo { int32 official_type = 4; } -// 拉取最近私信分享列表-响应 -message RspShareList { - // 最近会话列表 - repeated ShareSessionInfo session_list = 1; - // - int32 IsAddressListEmpty = 2; +// +message SimpleSession { + // 聊天对象uid,可以为用户id或者为群id + uint64 talker_id = 1; + // 会话类型 + uint32 session_type = 2; } + +// +message SysMsgInterfaceLastMsgRsp { + // + int32 unread = 1; + // + string title = 2; + // + string time = 3; + // + int64 id = 4; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/grpc_api/bilibili/im/type/im.proto b/grpc_api/bilibili/im/type/im.proto index 1eac65f..a7d6cf7 100644 --- a/grpc_api/bilibili/im/type/im.proto +++ b/grpc_api/bilibili/im/type/im.proto @@ -3,23 +3,11 @@ syntax = "proto3"; package bilibili.im.type; // -enum ENUM_BIZ_MSG_TYPE { +message AccountInfo { // - BIZ_MSG_TYPE_NORMAL = 0; + string name = 1; // - BIZ_MSG_TYPE_CARD_VIDEO = 1; -} - -// -enum RecverType{ - // - EN_NO_MEANING = 0; - //单人 - EN_RECVER_TYPE_PEER = 1; - //群 - EN_RECVER_TYPE_GROUP = 2; - //多人 - EN_RECVER_TYPE_PEERS = 3; + string pic_url = 2; } // @@ -53,15 +41,122 @@ enum CmdId { } // -enum RelationLogType { - EN_INVALID_LOG_TYPE = 0; // - EN_ADD_FRIEND = 1; // 添加好友 - EN_REMOVE_FRIEND = 2; // 删除好友 - EN_JOIN_GROUP = 3; // 加入群 - EN_EXIT_GROUP = 4; // 退出群 +enum ENUM_BIZ_MSG_TYPE { + BIZ_MSG_TYPE_NORMAL = 0; // + BIZ_MSG_TYPE_CARD_VIDEO = 1; // } // +message FriendRelation { + // 用户mid + uint64 uid = 1; + // 用户昵称 + string user_name = 2; + // 头像url + string face = 3; + // vip类型 + // 0:无 1:月度大会员 2:年度大会员 + uint32 vip_level = 4; +} + +// +message GroupRelation { + // + uint64 group_id = 1; + // + uint64 owner_uid = 2; + // + uint32 group_type = 3; + // + uint32 group_level = 4; + // + string group_cover = 5; + // + string group_name = 6; + // + string group_notice = 7; + // + int32 status = 8; + // + int32 member_role = 9; + // + string fans_medal_name = 10; + // + uint64 room_id = 11; +} + +// 关键词高亮文本 +message HighText { + // + string title = 1; + // + string url = 2; + // 表示高亮文本应该高亮第几个匹配的文本,ps:比如,“有疑问请联系客服,联系客服时,请说明具体的情况”,一共有2个匹配的文本,要高亮第一个匹配的,则index=1 + uint32 index = 3; +} + +// +message ImgInfo{ + // + string url = 1; + // + int32 width = 2; + // + int32 height = 3; + // + string imageType = 4; +} + +// 关键词命中信息 +message KeyHitInfos { + // + string toast = 1; + // + uint32 rule_id = 2; + // + repeated HighText high_text = 3; + // +} + +// +message Msg { + // 发送方mid + uint64 sender_uid = 1; + // 接收方类型 + RecverType receiver_type = 2; + // 接收方mid + uint64 receiver_id = 3; + // 客户端的序列id,用于服务端去重 + uint64 cli_msg_id = 4; + // 消息类型 + MsgType msg_type = 5; + // 消息内容 + string content = 6; + // 服务端的序列号x + uint64 msg_seqno = 7; + // 消息发送时间(服务端时间) + uint64 timestamp = 8; + // @用户列表 + repeated uint64 at_uids = 9; + // 多人消息 + repeated uint64 recver_ids = 10; + // 消息唯一标示 + uint64 msg_key = 11; + // 消息状态 + uint32 msg_status = 12; + // 是否为系统撤销 + bool sys_cancel = 13; + // 通知码 + string notify_code = 14; + // 消息来源 + MsgSource msg_source = 15; + // 如果msg.content有表情字符,则该参数需要置为1 + int32 new_face_version = 16; + // 命中关键词信息 + KeyHitInfos key_hit_infos = 17; +} + +// 消息来源 enum MsgSource { EN_MSG_SOURCE_UNKONW = 0; // EN_MSG_SOURCE_IOS = 1; // @@ -78,7 +173,7 @@ enum MsgSource { EN_MSG_SOURCE_VC_ATTACH_MSG = 12; // }; -//消息类型 +// 消息类型 enum MsgType { // 基础消息类型 EN_INVALID_MSG_TYPE = 0; // 空空的~ @@ -143,6 +238,35 @@ enum MsgType { EN_MSG_TYPE_CHAT_POPUP_SESSION = 306; // 弹出会话 } +// 接收方类型 +enum RecverType { + EN_NO_MEANING = 0; // + EN_RECVER_TYPE_PEER = 1; // 单人 + EN_RECVER_TYPE_GROUP = 2; // 群 + EN_RECVER_TYPE_PEERS = 3; // 多人 +} + +// +message RelationLog { + // 操作类型 + RelationLogType log_type = 1; + // 操作seqno + uint64 oplog_seqno = 2; + // 好友信息 + FriendRelation friend_relation = 3; + // 群信息 + GroupRelation group_relation = 4; +} + +// +enum RelationLogType { + EN_INVALID_LOG_TYPE = 0; // + EN_ADD_FRIEND = 1; // 添加好友 + EN_REMOVE_FRIEND = 2; // 删除好友 + EN_JOIN_GROUP = 3; // 加入群 + EN_EXIT_GROUP = 4; // 退出群 +} + // enum SESSION_TYPE { INVALID_SESSION_TYPE = 0; // @@ -152,65 +276,6 @@ enum SESSION_TYPE { ALL_SESSION = 4; // } -// 关键词高亮文本 -message HighText { - // - string title = 1; - // - string url = 2; - // 表示高亮文本应该高亮第几个匹配的文本,ps:比如,“有疑问请联系客服,联系客服时,请说明具体的情况”,一共有2个匹配的文本,要高亮第一个匹配的,则index=1 - uint32 index = 3; -} - -//关键词命中信息 -message KeyHitInfos { - // - string toast = 1; - // - uint32 rule_id = 2; - // - repeated HighText high_text = 3; - // -} - -// -message Msg { - // 发送方mid - uint64 sender_uid = 1; - // 接收方类型 - int32 receiver_type = 2; - // 接收方mid - uint64 receiver_id = 3; - // 客户端的序列id,用于服务端去重 - uint64 cli_msg_id = 4; - // 消息类型 - int32 msg_type = 5; - // 消息内容 - string content = 6; - // 服务端的序列号x - uint64 msg_seqno = 7; - // 消息发送时间(服务端时间) - uint64 timestamp = 8; - // @用户列表 - repeated uint64 at_uids = 9; - // 多人消息 - repeated uint64 recver_ids = 10; - // 消息唯一标示 - uint64 msg_key = 11; - // 消息状态 - uint32 msg_status = 12; - // 是否为系统撤销 - bool sys_cancel = 13; - // 通知码 - string notify_code = 14; - // 消息来源 - uint32 msg_source = 15; - // 如果msg.content有表情字符,则该参数需要置为1 - int32 new_face_version = 16; - // 命中关键词信息 - KeyHitInfos key_hit_infos = 17; -} - // 会话详情 message SessionInfo { // @@ -253,71 +318,14 @@ message SessionInfo { uint32 setting = 19; // uint32 is_guardian = 20; + // + int32 is_intercept = 21; + // + int32 is_trust = 22; + // + int32 system_msg_type = 23; + // + AccountInfo account_info = 24; + // + int32 live_status = 25; } - -// -message RelationLog { - // 操作类型 - int32 log_type = 1; - // 操作seqno - uint64 oplog_seqno = 2; - // 好友信息 - FriendRelation friend_relation = 3; - // 群信息 - GroupRelation group_relation = 4; -} - -// -message FriendRelation { - // 用户mid - uint64 uid = 1; - // 用户昵称 - string user_name = 2; - // 头像url - string face = 3; - // vip类型 - // 0:无 1:月度大会员 2:年度大会员 - uint32 vip_level = 4; -} - -// -message ImgInfo{ - // - string url = 1; - // - int32 width = 2; - // - int32 height = 3; - // - string imageType = 4; -} - -// -message GroupRelation { - // - uint64 group_id = 1; - // - uint64 owner_uid = 2; - // - uint32 group_type = 3; - // - uint32 group_level = 4; - // - string group_cover = 5; - // - string group_name = 6; - // - string group_notice = 7; - // - int32 status = 8; - // - int32 member_role = 9; - // - string fans_medal_name = 10; - // - uint64 room_id = 11; -} - - - - diff --git a/grpc_api/bilibili/live/app/room/v1/room.proto b/grpc_api/bilibili/live/app/room/v1/room.proto new file mode 100644 index 0000000..8f7c0bd --- /dev/null +++ b/grpc_api/bilibili/live/app/room/v1/room.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; + +package bilibili.live.app.room.v1; + +// +message GetStudioListReq { + // + int64 room_id = 1; +} + +// +message GetStudioListResp { + // + message Pendants { + // + Pendant frame = 1; + // + Pendant badge = 2; + } + // + message Pendant { + // + string name = 1; + // + int64 position = 2; + // + string value = 3; + // + string desc = 4; + } + // + message StudioMaster { + // + int64 uid = 1; + // + int64 room_id = 2; + // + string uname = 3; + // + string face = 4; + // + Pendants pendants = 5; + // + string tag = 6; + // + int64 tag_type = 7; + } + // + int64 status = 1; + // + repeated StudioMaster master_list = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/live/general/interfaces/v1/interfaces.proto b/grpc_api/bilibili/live/general/interfaces/v1/interfaces.proto new file mode 100644 index 0000000..110f211 --- /dev/null +++ b/grpc_api/bilibili/live/general/interfaces/v1/interfaces.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; + +package bilibili.live.general.interfaces.v1; + +// +message GetOnlineRankReq { + // + int64 ruid = 1; + // + int64 room_id = 2; + // + int64 page = 3; + // + int64 page_size = 4; + // + string platform = 5; +} + +// +message GetOnlineRankResp { + // + message OnlineRankItem { + // + int64 uid = 1; + // + string uname = 2; + // + string face = 3; + // + int64 continue_watch = 4; + // + MedalInfo medal_info = 5; + // + int64 guard_level = 6; + } + // + OnlineRankItem item = 1; + // + int64 online_num = 2; +} + +// +message MedalInfo { + // + int64 guard_level = 1; + // + int64 medal_color_start = 2; + // + int64 medal_color_end = 3; + // + int64 medal_color_border = 4; + // + string medal_name = 5; + // + int64 level = 6; + // + int64 target_id = 7; + // + int64 is_light = 8; +} diff --git a/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto b/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto index f79a0b9..34b1bf7 100644 --- a/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto +++ b/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto @@ -12,6 +12,24 @@ service Echo { rpc Error(ErrorRequest) returns(ErrorResponse); } +// +message ErrorRequest { + // + int32 error = 2; + // + int64 time = 1; + // + int64 delay = 3; +} + +// +message ErrorResponse { + // + string host = 1; + // + int64 time = 3; +} + // message PingRequest { // @@ -41,21 +59,3 @@ message SayResponse { // int64 time = 3; } - -// -message ErrorRequest { - // - int32 error = 2; - // - int64 time = 1; - // - int64 delay = 3; -} - -// -message ErrorResponse { - // - string host = 1; - // - int64 time = 3; -} diff --git a/grpc_api/bilibili/main/community/reply/v1/reply.proto b/grpc_api/bilibili/main/community/reply/v1/reply.proto index e2ccf3f..b232b6d 100644 --- a/grpc_api/bilibili/main/community/reply/v1/reply.proto +++ b/grpc_api/bilibili/main/community/reply/v1/reply.proto @@ -7,17 +7,84 @@ import "google/protobuf/any.proto"; // 评论区 service Reply { // 主评论列表接口 - rpc MainList(MainListReq) returns (MainListReply); + rpc MainList (MainListReq) returns (MainListReply); // 二级评论明细接口 - rpc DetailList(DetailListReq) returns (DetailListReply); + rpc DetailList (DetailListReq) returns (DetailListReply); // 对话评论树接口 - rpc DialogList(DialogListReq) returns (DialogListReply); + rpc DialogList (DialogListReq) returns (DialogListReply); // 评论预览接口 rpc PreviewList (PreviewListReq) returns (PreviewListReply); // 评论搜索item前置发布接口 - rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply); + rpc SearchItemPreHook (SearchItemPreHookReq) returns (SearchItemPreHookReply); // 评论搜索插入项目接口 - rpc SearchItem(SearchItemReq) returns (SearchItemReply); + rpc SearchItem (SearchItemReq) returns (SearchItemReply); + // + rpc AtSearch (AtSearchReq) returns (AtSearchReply); + // + rpc ReplyInfo (ReplyInfoReq) returns (ReplyInfoReply); + // + rpc UserCallback (UserCallbackReq) returns (UserCallbackReply); + // + rpc ShareRepliesInfo (ShareRepliesInfoReq) returns (ShareRepliesInfoResp); +} + +// 活动 +message Activity { + // 活动id + int64 activity_id = 1; + // 活动状态 + // -1:待审 1:上线 + int64 activity_state = 2; + // 参与活动的输入框文案 + string activity_placeholder = 3; +} + +// 文章项目 +message ArticleSearchItem { + // 标题 + string title = 1; + // UP主昵称 + string up_nickname = 2; + // 封面 + repeated string covers = 3; +} + +// +message AtGroup { + // + int32 group_type = 1; + // + string group_name = 2; + // + repeated AtItem items = 3; +} + +// +message AtItem { + // + int64 mid = 1; + // + string name = 2; + // + string face = 3; + // + int32 fans = 4; + // + int32 official_verify_type = 5; +} + +// +message AtSearchReply { + // + repeated AtGroup groups = 1; +} + +// +message AtSearchReq { + // + int64 mid = 1; + // + string keyword = 2; } // 广告 @@ -26,36 +93,61 @@ message CM { google.protobuf.Any source_content = 1; } -// 对话评论树-请求 -message DialogListReq { - // 目标评论区id - int64 oid = 1; - // 目标评论区类型 - int64 type = 2; - // 根评论rpid - int64 root = 3; - // 对话评论rpid - int64 rpid = 4; - // 页面游标 - CursorReq cursor = 5; +// 评论主体信息 +message Content { + // 评论文本 + string message = 1; + // at到的用户信息 + map menber = 2; + // 需要渲染的表情转义 + map emote = 3; + // 需要高亮的话题转义 + map topic = 4; + // 需要高亮的超链转义 + map url = 5; + // 投票信息 + Vote vote = 6; } -// 对话评论树-响应 -message DialogListReply { +// 页面游标回复 +message CursorReply { + // 下页数据 + int64 next = 1; + // 上页数据 + int64 prev = 2; + // 是否到顶 + bool isBegin = 3; + // 是否到底 + bool isEnd = 4; + // 排序方式 + // 2:时间 3:热度 + Mode mode = 5; + // 当前排序mode在切换按钮上的展示文案 + string mode_text = 6; +} + +// 页面游标请求 +message CursorReq { + // 下页数据 + int64 next = 1; + // 上页数据 + int64 prev = 2; + // 排序方式 + Mode mode = 4; +} + +// 二级评论明细-响应 +message DetailListReply { // 页面游标 CursorReply cursor = 1; // 评论区显示控制字段 SubjectControl subject_control = 2; - // 子评论列表 - repeated ReplyInfo replies = 3; + // 根评论信息(带二级评论) + ReplyInfo root = 3; // 评论区的活动 Activity activity = 4; -} - -// 来源标识 -enum DetailListScene { - REPLY = 0; // 评论区展开 - MSG_FEED = 1; // 回复消息推送 + // + LikeInfo likes = 5; } // 二级评论明细-请求 @@ -74,70 +166,116 @@ message DetailListReq { DetailListScene scene = 6; } -// 二级评论明细-响应 -message DetailListReply { +// 来源标识 +enum DetailListScene { + REPLY = 0; // 评论区展开 + MSG_FEED = 1; // 回复消息推送 + NOTIFY = 2; // +} + +// 对话评论树-响应 +message DialogListReply { // 页面游标 CursorReply cursor = 1; // 评论区显示控制字段 SubjectControl subject_control = 2; - // 根评论信息(带二级评论) - ReplyInfo root = 3; + // 子评论列表 + repeated ReplyInfo replies = 3; // 评论区的活动 Activity activity = 4; } -// 主评论列表-请求 -message MainListReq { +// 对话评论树-请求 +message DialogListReq { // 目标评论区id int64 oid = 1; // 目标评论区类型 int64 type = 2; + // 根评论rpid + int64 root = 3; + // 对话评论rpid + int64 rpid = 4; // 页面游标 - CursorReq cursor = 3; - // 扩展数据json - string extra = 4; - // 广告扩展json - string ad_extra = 5; - // 目标评论rpid - int64 rpid = 6; + CursorReq cursor = 5; } -// 评论区预览-请求 -message PreviewListReq { - // 目标评论区id - int64 oid = 1; - // 目标评论区类型 - int64 type = 2; - // 页面游标 - CursorReq cursor = 3; +// 特效 +message Effects { + // + string preloading = 1; +} + +// 表情项 +message Emote { + // 表情大小 + // 1:小 2:大 + int64 size = 1; + // 表情url + string url = 2; + // + string jump_url = 3; + // + string jump_title = 4; + // + int64 id = 5; + // + int64 package_id = 6; + // + string gif_url = 7; +} + +// 商品项目 +message GoodsSearchItem { + // 商品id + int64 id = 1; + // 商品名 + string name = 2; + // 价钱 + string price = 3; + // 收入 + string income = 4; + // 图片 + string img = 5; + // 标签 + string label = 6; } // -message ReplyExtra { +message LikeInfo { // - int64 season_id = 1; + message Item { + // + Member member = 1; + } // - int64 season_type = 2; + repeated Item items = 1; // - int64 ep_id = 3; - // - bool is_story = 4; + string title = 2; } -// 评论区预览-回复 -message PreviewListReply { - // 页面游标 - CursorReply cursor = 1; - // 评论列表 - repeated ReplyInfo replies = 2; - // 评论区显示控制字段 - SubjectControl subject_control = 3; - // UP置顶评论 - ReplyInfo upTop = 4; - // 管理员置顶评论 - ReplyInfo admin_top = 5; - // 投票置顶评论 - ReplyInfo vote_top = 6; +// 抽奖 +message Lottery { + // 抽奖id + int64 lottery_id = 1; + // 抽奖状态 + // 0:未开奖 1:开奖中 2:已开奖 + int64 lottery_status = 2; + // 抽奖人mid + int64 lottery_mid = 3; + // 开奖时间 + int64 lottery_time = 4; + // + int64 oid = 5; + // + int64 type = 6; + // 发送时间 + int64 ctime = 7; + // 抽奖评论正文 + Content content = 8; + // 用户信息 + Member member = 9; + // 评论条目控制字段 + ReplyControl reply_control = 10; } // 主评论列表-响应 @@ -166,279 +304,30 @@ message MainListReply { CM cm = 11; // 特效 Effects effects = 12; -} - -// 特效 -message Effects { // - string preloading = 1; -} - -// -message UpSelection { - // 待审评论数 - int64 pending_count = 1; - // 忽略评论数 - int64 ignore_count = 2; -} - -// -message Notice { + Operation operation = 13; // - int64 id = 1; + repeated ReplyInfo top_replies = 14; // - string content = 2; + QoeInfo qoe = 15; // - string link = 3; + map callbacks = 16; } -// 活动 -message Activity { - // 活动id - int64 activity_id = 1; - // 活动状态 - // -1:待审 1:上线 - int64 activity_state = 2; - // 参与活动的输入框文案 - string activity_placeholder = 3; -} - -// 抽奖 -message Lottery { - // 抽奖id - int64 lottery_id = 1; - // 抽奖状态 - // 0:未开奖 1:开奖中 2:已开奖 - int64 lottery_status = 2; - // 抽奖人mid - int64 lottery_mid = 3; - // 开奖时间 - int64 lottery_time = 4; - // - int64 oid = 5; - // - int64 type = 6; - // 发送时间 - int64 ctime = 7; - // 抽奖评论正文 - Content content = 8; - // 用户信息 - Member member = 9; - // 评论条目控制字段 - ReplyControl reply_control = 10; -} - -// 排序方式 -enum Mode { - DEFAULT = 0; // - UNSPECIFIED = 1; // 默认排序 - MAIN_LIST_TIME = 2; // 按时间 - MAIN_LIST_HOT = 3; // 按热度 -} - -// 页面游标请求 -message CursorReq { - // 下页数据 - int64 next = 1; - // 上页数据 - int64 prev = 2; - // 排序方式 - Mode mode = 4; -} - -// 页面游标回复 -message CursorReply { - // 下页数据 - int64 next = 1; - // 上页数据 - int64 prev = 2; - // 是否到顶 - bool isBegin = 3; - // 是否到底 - bool isEnd = 4; - // 排序方式 - // 2:时间 3:热度 - Mode mode = 5; - // 当前排序mode在切换按钮上的展示文案 - string mode_text = 6; -} - -// 评论区控制字段 -message SubjectControl { - // UP主mid - int64 up_mid = 1; - // 自己是否为协管 - bool is_assist = 2; - // 是否只读 - bool read_only = 3; - // 是否有发起投票权限 - bool has_vote_access = 4; - // 是否有发起抽奖权限 - bool has_lottery_access = 5; - // 是否有被折叠评论 - bool has_folded_reply = 6; - // 空评论区背景文案 - string bg_text = 7; - // 是否被UP拉黑 - bool up_blocked = 8; - // 是否有发起活动权限 - bool has_activity_access = 9; - // 标题展示控制 - bool show_title = 10; - // 是否显示UP主操作标志 - bool show_up_action = 11; - // 是否显示评论区排序切换按钮 - int64 switcher_type = 12; - // 是否禁止输入框 - bool input_disable = 13; - // 根评论输入框背景文案 - string root_text = 14; - // 子评论输入框背景文案 - string child_text = 15; - // 评论总数 - int64 count = 16; - // 评论区标题 - string title = 17; - // 离开态输入框的文案 - string giveup_text = 18; -} - -// 评论条目信息 -message ReplyInfo { - // 二级评论列表 - repeated ReplyInfo replies = 1; - // 评论rpid - int64 id = 2; - // 评论区对象id - int64 oid = 3; - // 评论区类型 - int64 type = 4; - // 发布者UID - int64 mid = 5; - // 根评论rpid - int64 root = 6; - // 父评论rpid - int64 parent = 7; - // 对话评论rpid - int64 dialog = 8; - // 点赞数 - int64 like = 9; - // 发布时间 - int64 ctime = 10; - // 回复数 - int64 count = 11; - // 评论主体信息 - Content content = 12; - // 发布者信息 - Member member = 13; - // 评论控制字段 - ReplyControl reply_control = 14; -} - -//评论主体信息 -message Content { - //评论文本 - string message = 1; - //at到的用户信息 - map menber = 2; - //需要渲染的表情转义 - map emote = 3; - //需要高亮的话题转义 - map topic = 4; - //需要高亮的超链转义 - map url = 5; - //投票信息 - Vote vote = 6; -} - -// 评论条目控制字段 -message ReplyControl { - // 操作行为标志 - // 0:无 1:已点赞 2:已点踩 - int64 action = 1; - // 是否UP觉得很赞 - bool up_like = 2; - // 是否存在UP回复 - bool up_reply = 3; - // 是否显示关注按钮 - bool show_follow_btn = 4; - // 是否协管 - bool is_assist = 5; - // 是否展示标签 - string label_text = 6; - // 是否关注 - bool following = 7; - // 是否粉丝 - bool followed = 8; - // 是否被自己拉黑 - bool blocked = 9; - // 是否存在折叠的二级评论 - bool has_folded_reply = 10; - // 是否折叠 - bool is_folded_reply = 11; - // 是否UP置顶 - bool is_up_top = 12; - // 是否管理置顶 - bool is_admin_top = 13; - // 是否置顶投票评论 - bool is_vote_top = 14; - // 最大收起显示行数 - int64 max_line = 15; - // 该条评论可不可见 - bool invisible = 16; - // 是否和up签订契约 - bool is_contractor = 17; - // 是否是笔记评论 - bool is_note = 18; -} - -// 超链项 -message Url { - // 标题 - string title = 1; - // - int64 state = 2; - // 图标url - string prefix_icon = 3; - // - string app_url_schema = 4; - // - string app_name = 5; - // - string app_package_name = 6; - // 上报id - string click_report = 7; - // - bool is_half_screen = 8; - // - string exposure_report = 9; -} - -// 话题项 -message Topic { - // 跳转url - string link = 1; - // 话题id - int64 id = 2; -} - -// 表情项 -message Emote { - // 表情大小 - // 1:小 2:大 - int64 size = 1; - // 表情url - string url = 2; -} - -// 投票信息 -message Vote { - // 投票id - int64 id = 1; - // 投票标题 - string title = 2; - // 参与人数 - int64 count = 3; +// 主评论列表-请求 +message MainListReq { + // 目标评论区id + int64 oid = 1; + // 目标评论区类型 + int64 type = 2; + // 页面游标 + CursorReq cursor = 3; + // 扩展数据json + string extra = 4; + // 广告扩展json + string ad_extra = 5; + // 目标评论rpid + int64 rpid = 6; } // 用户信息 @@ -497,82 +386,265 @@ message Member { string vip_label_text = 23; // 会员标颜色 string vip_label_theme = 24; + // + int64 fans_medal_color_end = 25; + // + int64 fans_medal_color_border = 26; + // + int64 fans_medal_color_name = 27; + // + int64 fans_medal_color_level = 28; + // + int64 fans_guard_level = 29; + // + int32 face_nft = 30; + // + int32 face_nft_new = 31; + // + int32 is_senior_member = 32; +} + +// 排序方式 +enum Mode { + DEFAULT = 0; // + UNSPECIFIED = 1; // 默认排序 + MAIN_LIST_TIME = 2; // 按时间 + MAIN_LIST_HOT = 3; // 按热度 } // -enum SearchItemType { - DEFAULT_ITEM_TYPE = 0; // - GOODS_VALUE = 1; // - VIDEO_VALUE = 2; // - ARTICLE_VALUE = 3; // +message Notice { + // + int64 id = 1; + // + string content = 2; + // + string link = 3; } // -enum SearchItemVideoSubType { - UGC = 0; // - PGC = 1; // +message Operation { + // + int32 type = 1; + // + int64 id = 2; + // + OperationTitle title = 3; + // + OperationTitle subtitle = 4; + // + string link = 5; + // + string report_extra = 6; } -// 评论搜索item前置发布-请求 -message SearchItemPreHookReq { +// +message OperationTitle { + // + string content = 1; + // + bool is_highlight = 2; +} + +// PGC视频项目 +message PGCVideoSearchItem { + // 标题 + string title = 1; + // 类别 + string category = 2; + // 封面 + string cover = 3; +} + +// 评论区预览-回复 +message PreviewListReply { + // 页面游标 + CursorReply cursor = 1; + // 评论列表 + repeated ReplyInfo replies = 2; + // 评论区显示控制字段 + SubjectControl subject_control = 3; + // UP置顶评论 + ReplyInfo upTop = 4; + // 管理员置顶评论 + ReplyInfo admin_top = 5; + // 投票置顶评论 + ReplyInfo vote_top = 6; +} + +// 评论区预览-请求 +message PreviewListReq { // 目标评论区id int64 oid = 1; // 目标评论区类型 int64 type = 2; -} - -// 评论搜索item前置发布-响应 -message SearchItemPreHookReply { - // 输入框的文案 - string placeholder_text = 1; - // 背景空白的时候的文案 - string background_text = 2; - // 有权限的tab栏的顺序 - repeated SearchItemType ordered_type = 3; -} - -// 评论搜索插入项目-请求 -message SearchItemReq { - //页面游标 - SearchItemCursorReq cursor = 1; - //目标评论区id - int64 oid = 2; - //评论区类型 - int64 type = 3; - //搜索关键词 - string keyword = 4; + // 页面游标 + CursorReq cursor = 3; } // -message SearchItemReplyExtraInfo { +message QoeInfo { // - string event_id = 1; -} - -// 评论搜索插入项目-回复 -message SearchItemReply { + int64 id = 1; // - SearchItemCursorReply cursor = 1; - // 搜索的结果 - repeated SearchItem items = 2; - // 附加信息 - SearchItemReplyExtraInfo extra = 3; + int32 type = 2; + // + int32 style = 3; + // + string title = 4; + // + string feedback_title = 5; + // + repeated QoeScoreItem score_items = 6; + // + int64 display_rank = 7; } -// 评论搜索插入项目请求游标 -message SearchItemCursorReq { - // 下一页 - int64 next = 1; - // tab类型 - SearchItemType item_type = 2; +// +message QoeScoreItem { + // + string title = 1; + // + string url = 2; + // + float score = 3; } -// 评论搜索插入项目响应游标 -message SearchItemCursorReply { - // 是否有下一页 - bool has_next = 1; - // 下页 - int64 next = 2; +// +message ReplyCardLabel { + // + string text_content = 1; + // + string text_color_day = 2; + // + string text_color_night = 3; + // + string label_color_day = 4; + // + string label_color_night = 5; + // + string image = 6; + // + int32 type = 7; + // + string background = 8; + // + double background_width = 9; + // + double background_height = 10; + // + string jump_url = 11; +} + +// 评论条目控制字段 +message ReplyControl { + // 操作行为标志 + // 0:无 1:已点赞 2:已点踩 + int64 action = 1; + // 是否UP觉得很赞 + bool up_like = 2; + // 是否存在UP回复 + bool up_reply = 3; + // 是否显示关注按钮 + bool show_follow_btn = 4; + // 是否协管 + bool is_assist = 5; + // 是否展示标签 + string label_text = 6; + // 是否关注 + bool following = 7; + // 是否粉丝 + bool followed = 8; + // 是否被自己拉黑 + bool blocked = 9; + // 是否存在折叠的二级评论 + bool has_folded_reply = 10; + // 是否折叠 + bool is_folded_reply = 11; + // 是否UP置顶 + bool is_up_top = 12; + // 是否管理置顶 + bool is_admin_top = 13; + // 是否置顶投票评论 + bool is_vote_top = 14; + // 最大收起显示行数 + int64 max_line = 15; + // 该条评论可不可见 + bool invisible = 16; + // 是否和up签订契约 + bool is_contractor = 17; + // 是否是笔记评论 + bool is_note = 18; + // + repeated ReplyCardLabel card_labels = 19; + // + string sub_reply_entry_text = 20; + // + string sub_reply_title_text = 21; + // + string contract_desc = 22; + // + string time_desc = 23; + // + string biz_scene = 24; +} + +// +message ReplyExtra { + // + int64 season_id = 1; + // + int64 season_type = 2; + // + int64 ep_id = 3; + // + bool is_story = 4; +} + +// 评论条目信息 +message ReplyInfo { + // 二级评论列表 + repeated ReplyInfo replies = 1; + // 评论rpid + int64 id = 2; + // 评论区对象id + int64 oid = 3; + // 评论区类型 + int64 type = 4; + // 发布者UID + int64 mid = 5; + // 根评论rpid + int64 root = 6; + // 父评论rpid + int64 parent = 7; + // 对话评论rpid + int64 dialog = 8; + // 点赞数 + int64 like = 9; + // 发布时间 + int64 ctime = 10; + // 回复数 + int64 count = 11; + // 评论主体信息 + Content content = 12; + // 发布者信息 + Member member = 13; + // 评论控制字段 + ReplyControl reply_control = 14; +} + +// +message ReplyInfoReply { + // + ReplyInfo reply = 1; +} + +// +message ReplyInfoReq { + // + int64 rpid = 1; + // + int32 scene = 2; } // 评论搜索插入项目 @@ -590,20 +662,262 @@ message SearchItem { } } -// 商品项目 -message GoodsSearchItem { - // 商品id - int64 id = 1; - // 商品名 - string name = 2; - // 价钱 - string price = 3; - // 收入 - string income = 4; - // 图片 - string img = 5; - // 标签 - string label = 6; +// 评论搜索插入项目响应游标 +message SearchItemCursorReply { + // 是否有下一页 + bool has_next = 1; + // 下页 + int64 next = 2; +} + +// 评论搜索插入项目请求游标 +message SearchItemCursorReq { + // 下一页 + int64 next = 1; + // tab类型 + SearchItemType item_type = 2; +} + +// 评论搜索item前置发布-响应 +message SearchItemPreHookReply { + // 输入框的文案 + string placeholder_text = 1; + // 背景空白的时候的文案 + string background_text = 2; + // 有权限的tab栏的顺序 + repeated SearchItemType ordered_type = 3; +} + +// 评论搜索item前置发布-请求 +message SearchItemPreHookReq { + // 目标评论区id + int64 oid = 1; + // 目标评论区类型 + int64 type = 2; +} + +// 评论搜索插入项目-回复 +message SearchItemReply { + // + SearchItemCursorReply cursor = 1; + // 搜索的结果 + repeated SearchItem items = 2; + // 附加信息 + SearchItemReplyExtraInfo extra = 3; +} + +// +message SearchItemReplyExtraInfo { + // + string event_id = 1; +} + +// 评论搜索插入项目-请求 +message SearchItemReq { + //页面游标 + SearchItemCursorReq cursor = 1; + //目标评论区id + int64 oid = 2; + //评论区类型 + int64 type = 3; + //搜索关键词 + string keyword = 4; +} + +// +enum SearchItemType { + DEFAULT_ITEM_TYPE = 0; // + GOODS = 1; // + VIDEO = 2; // + ARTICLE = 3; // +} + +// +enum SearchItemVideoSubType { + UGC = 0; // + PGC = 1; // +} + +// +message ShareRepliesInfoReq { + // + int64 oid = 2; + // + int64 type = 3; +} + +// +message ShareRepliesInfoResp { + // + message ShareExtra { + // + bool is_pgc = 1; + } + // + repeated ShareReplyInfo infos = 1; + // + string from_title = 2; + // + string from_up = 3; + // + string from_pic = 4; + // + string url = 5; + // + string slogan_pic = 6; + // + string slogan_text = 7; + // + ShareReplyTopic topic = 8; + // + ShareExtra extra = 9; +} + +// +message ShareReplyInfo { + // + Member member = 1; + // + Content content = 2; + // + string title = 3; + // + string sub_title = 4; + // + string achievement_text = 5; + // + string label_url = 6; +} + +// +message ShareReplyTopic { + // + Topic topic = 1; + // + string origin_text = 2; +} + +// 评论区控制字段 +message SubjectControl { + // UP主mid + int64 up_mid = 1; + // 自己是否为协管 + bool is_assist = 2; + // 是否只读 + bool read_only = 3; + // 是否有发起投票权限 + bool has_vote_access = 4; + // 是否有发起抽奖权限 + bool has_lottery_access = 5; + // 是否有被折叠评论 + bool has_folded_reply = 6; + // 空评论区背景文案 + string bg_text = 7; + // 是否被UP拉黑 + bool up_blocked = 8; + // 是否有发起活动权限 + bool has_activity_access = 9; + // 标题展示控制 + bool show_title = 10; + // 是否显示UP主操作标志 + bool show_up_action = 11; + // 是否显示评论区排序切换按钮 + int64 switcher_type = 12; + // 是否禁止输入框 + bool input_disable = 13; + // 根评论输入框背景文案 + string root_text = 14; + // 子评论输入框背景文案 + string child_text = 15; + // 评论总数 + int64 count = 16; + // 评论区标题 + string title = 17; + // 离开态输入框的文案 + string giveup_text = 18; + // + bool has_note_access = 19; + // + bool disable_jump_emote = 20; +} + +// 话题项 +message Topic { + // 跳转url + string link = 1; + // 话题id + int64 id = 2; +} + +// UGC视频项目 +message UGCVideoSearchItem { + // 标题 + string title = 1; + // UP主昵称 + string up_nickname = 2; + // 时长(单位为秒) + int64 duration = 3; + // 封面 + string cover = 4; +} + +// +message UpSelection { + // 待审评论数 + int64 pending_count = 1; + // 忽略评论数 + int64 ignore_count = 2; +} + +// 超链项 +message Url { + // 标题 + string title = 1; + // + int64 state = 2; + // 图标url + string prefix_icon = 3; + // + string app_url_schema = 4; + // + string app_name = 5; + // + string app_package_name = 6; + // 上报id + string click_report = 7; + // + bool is_half_screen = 8; + // + string exposure_report = 9; +} + +// +enum UserCallbackAction { + Dismiss = 0; // +} + +// +message UserCallbackReply { + +} + +// +message UserCallbackReq { + // + int64 mid = 1; + // + UserCallbackScene scene = 2; + // + UserCallbackAction action = 3; + // + int64 oid = 4; + // + int64 type = 5; +} + +// +enum UserCallbackScene { + Insert = 0; // } // 视频项目 @@ -619,34 +933,12 @@ message VideoSearchItem { } } -// UGC视频项目 -message UGCVideoSearchItem { - // 标题 - string title = 1; - // UP主昵称 - string up_nickname = 2; - // 时长(单位为秒) - int64 duration = 3; - // 封面 - string cover = 4; -} - -// PGC视频项目 -message PGCVideoSearchItem { - // 标题 - string title = 1; - // 类别 - string category = 2; - // 封面 - string cover = 3; -} - -// 文章项目 -message ArticleSearchItem { - // 标题 - string title = 1; - // UP主昵称 - string up_nickname = 2; - // 封面 - repeated string covers = 3; +// 投票信息 +message Vote { + // 投票id + int64 id = 1; + // 投票标题 + string title = 2; + // 参与人数 + int64 count = 3; } diff --git a/grpc_api/bilibili/metadata/device/device.proto b/grpc_api/bilibili/metadata/device/device.proto index 45108e6..c56376b 100644 --- a/grpc_api/bilibili/metadata/device/device.proto +++ b/grpc_api/bilibili/metadata/device/device.proto @@ -36,4 +36,6 @@ message Device { string version_name = 13; // 设备指纹, 不区分本地或远程设备指纹,作为推送目标的索引 string fp = 14; + // + int64 fts = 15; } diff --git a/grpc_api/bilibili/metadata/fawkes/fawkes.proto b/grpc_api/bilibili/metadata/fawkes/fawkes.proto index 8ce7090..dfdbfa1 100644 --- a/grpc_api/bilibili/metadata/fawkes/fawkes.proto +++ b/grpc_api/bilibili/metadata/fawkes/fawkes.proto @@ -2,6 +2,15 @@ syntax = "proto3"; package bilibili.metadata.fawkes; +// +message FawkesReply { + // 客户端在fawkes系统中对应的已发布最新的config版本号 + string config = 1; + // 客户端在fawkes系统中对应的已发布最新的ff版本号 + string ff = 2; +} + +// message FawkesReq { // 客户端在fawkes系统的唯一名 string appkey = 1; @@ -10,10 +19,3 @@ message FawkesReq { // 启动id string session_id = 3; } - -message FawkesReply { - // 客户端在fawkes系统中对应的已发布最新的config版本号 - string config = 1; - // 客户端在fawkes系统中对应的已发布最新的ff版本号 - string ff = 2; -} diff --git a/grpc_api/bilibili/metadata/locale/locale.proto b/grpc_api/bilibili/metadata/locale/locale.proto index 8781278..67c4ee0 100644 --- a/grpc_api/bilibili/metadata/locale/locale.proto +++ b/grpc_api/bilibili/metadata/locale/locale.proto @@ -2,16 +2,6 @@ syntax = "proto3"; package bilibili.metadata.locale; -// Defined by https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html -message LocaleIds { - // A language designator is a code that represents a language. - string language = 1; - // Writing systems. - string script = 2; - // A region designator is a code that represents a country or an area. - string region = 3; -} - // 区域标识 // gRPC头部:x-bili-locale-bin message Locale { @@ -24,3 +14,13 @@ message Locale { // 时区 string timezone = 4; } + +// Defined by https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html +message LocaleIds { + // A language designator is a code that represents a language. + string language = 1; + // Writing systems. + string script = 2; + // A region designator is a code that represents a country or an area. + string region = 3; +} diff --git a/grpc_api/bilibili/metadata/network/network.proto b/grpc_api/bilibili/metadata/network/network.proto index 5282e9f..cce2a8f 100644 --- a/grpc_api/bilibili/metadata/network/network.proto +++ b/grpc_api/bilibili/metadata/network/network.proto @@ -2,6 +2,17 @@ syntax = "proto3"; package bilibili.metadata.network; +// 网络类型标识 +// gRPC头部:x-bili-network-bin +message Network { + // 网络类型 + NetworkType type = 1; + // 免流类型 + TFType tf = 2; + // 运营商 + string oid = 3; +} + // 网络类型 enum NetworkType { NT_UNKNOWN = 0; // 未知 @@ -22,14 +33,3 @@ enum TFType { T_CARD = 5; // 电信卡 T_PKG = 6; // 电信包 } - -// 网络类型标识 -// gRPC头部:x-bili-network-bin -message Network { - // 网络类型 - NetworkType type = 1; - // 免流类型 - TFType tf = 2; - // 运营商 - string oid = 3; -} diff --git a/grpc_api/bilibili/metadata/parabox/pararbox.proto b/grpc_api/bilibili/metadata/parabox/pararbox.proto new file mode 100644 index 0000000..65871fd --- /dev/null +++ b/grpc_api/bilibili/metadata/parabox/pararbox.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package bilibili.metadata.parabox; + +// +message Exp { + // + int64 id = 1; + // + int32 bucket = 2; +} + +// +message Exps { + // + repeated Exp exps = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/restriction/restriction.proto b/grpc_api/bilibili/metadata/restriction/restriction.proto index 57ad552..c8a3ac3 100644 --- a/grpc_api/bilibili/metadata/restriction/restriction.proto +++ b/grpc_api/bilibili/metadata/restriction/restriction.proto @@ -19,4 +19,6 @@ message Restriction { ModeType mode = 3; // app 审核review状态 bool review = 4; + // + bool disable_rcmd = 5; }