更新【评论区】proto结构体

This commit is contained in:
社会易姐QwQ 2021-06-11 01:47:28 +08:00
parent 555f7ae056
commit 3acd3e2167
5 changed files with 4034 additions and 883 deletions

View File

@ -1,812 +0,0 @@
//v1接口
syntax = "proto3";
package bilibili.main.community.reply.v1;
import "google/protobuf/any.proto";
service Reply {
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/MainList
rpc MainList(MainListReq) returns (MainListReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DetailList
rpc DetailList(DetailListReq) returns (DetailListReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList
rpc DialogList(DialogListReq) returns (DialogListReply);
//
//
rpc previewList (PreviewListReq) returns (PreviewListReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook
rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItem
rpc SearchItem(SearchItemReq) returns (SearchItemReply);
}
//-
message MainListReq {
//id
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
//
string extra = 4;
//
string adExtra = 5;
//
int64 rpid = 6;
}
//-
message MainListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
//UP置顶评论
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
//
Notice notice = 7;
//
Lottery lottery = 8;
//
Activity activity = 9;
//
UpSelection upSelection = 10;
//
CM cm = 11;
}
//-
message DetailListReq {
//id
int64 oid = 1;
//
int64 type = 2;
//rpid
int64 root = 3;
//rpid
int64 rpid = 4;
//
CursorReq cursor = 5;
//
DetailListScene scene = 6;
}
//-
message DetailListReply {
//
CursorReply cursor = 1;
//
SubjectControl subjectControl = 2;
//()
ReplyInfo root = 3;
//
Activity activity = 4;
}
//-
message DialogListReq {
//id
int64 oid = 1;
//
int64 type = 2;
//rpid
int64 root = 3;
//rpid
int64 rpid = 4;
//
CursorReq cursor = 5;
}
//-
message DialogListReply {
//
CursorReply cursor = 1;
//
SubjectControl subjectControl = 2;
//
repeated ReplyInfo replies = 3;
//
Activity activity = 4;
}
//?-
message PreviewListReq {
//
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
}
//?-
message PreviewListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
//
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
}
//?-
message SearchItemPreHookReq {
//id
int64 oid = 1;
//
int64 type = 2;
}
//?-
message SearchItemPreHookReply {
//
string placeholderText = 1;
//
string backgroundText = 2;
//
repeated SearchItemType orderedType = 3;
}
//-
message SearchItemReq {
//
SearchItemCursorReq cursor = 1;
//id
int64 oid = 2;
//
int64 type = 3;
//
string keyword = 4;
}
//-
message SearchItemReply {
//
SearchItemCursorReply cursor = 1;
//
repeated SearchItem items = 2;
//
SearchItemReplyExtraInfo extra = 3;
}
//
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;
//
Mode mode = 5;
}
//
enum SearchItemType {
//
DEFAULT_ITEM_TYPE = 0;
//
GOODS_VALUE = 1;
//
VIDEO_VALUE = 2;
//
ARTICLE_VALUE = 3;
}
//
enum DetailListScene {
//
REPLY = 0;
//
MSG_FEED = 1;
}
//
message SearchItemCursorReq {
//
int64 next = 1;
//
SearchItemType itemType = 2;
}
//
message SearchItemCursorReply {
//
bool hasNext = 1;
//
int64 next = 2;
}
//
message Member {
/**********基础信息**********/
//UID
int64 mid = 1;
//
string name = 2;
//
string sex = 3;
//url
string face = 4;
//
int64 level = 5;
//
int64 officialVerifyType = 6;
/**********VIP相关**********/
//
int64 vipType = 7;
//
int64 vipStatus = 8;
//
int64 vipThemeType = 9;
//url
string vipLabelPath = 10;
/**********装扮相关**********/
//url
string garbPendantImage = 11;
//url
string garbCardImage = 12;
//url
string garbCardImageWithFocus = 13;
//url
string garbCardJumpUrl = 14;
//id
string garbCardNumber = 15;
//id显示颜色
string garbCardFanColor = 16;
//
bool garbCardIsFan = 17;
/**********粉丝勋章相关**********/
//
string fansMedalName = 18;
//
int64 fansMedalLevel = 19;
//
int64 fansMedalColor = 20;
}
//
message Emote {
//
//1: 2:
int64 size = 1;
//url
string url = 2;
}
//
message Topic {
//url
string link = 1;
//id
int64 id = 2;
}
//
message Url {
//
string title = 1;
//
int64 state = 2;
//url
string prefixIcon = 3;
//
string appUrlSchema = 4;
//
string appName = 5;
//
string appPackageName = 6;
//id
string clickReport = 7;
}
//
message Vote {
//id
int64 id = 1;
//
string title = 2;
//
int64 count = 3;
}
//
message Content {
//
string message = 1;
//at到的用户信息
map<string,Member> menber = 2;
//
map<string,Emote> emote = 3;
//
map<string,Topic> topic = 4;
//
map<string,Url> url = 5;
//
Vote vote = 6;
}
//
message ReplyControl {
//
//0: 1: 2:
int64 action = 1;
//UP觉得很赞
bool upLike = 2;
//UP回复
bool upReply = 3;
//
bool showFollowBtn = 4;
//
bool isAssist = 5;
//
string labelText = 6;
//
bool following = 7;
//
bool followed = 8;
//
bool blocked = 9;
//
bool hasFoldedReply = 10;
//
bool isFoldedReply = 11;
//UP置顶
bool isUpTop = 12;
//
bool isAdminTop = 13;
//
bool isVoteTop = 14;
//
int64 maxLine = 15;
//
bool invisible = 16;
}
//
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 replyControl = 14;
}
//
message SubjectControl {
//UP主UID
int64 upMid = 1;
//
bool isAssist = 2;
//
bool readOnly = 3;
//
bool hasVoteAccess = 4;
//
bool hasLotteryAccess = 5;
//
bool hasFoldedReply = 6;
//
string bgText = 7;
//UP拉黑
bool upBlocked = 8;
//
bool hasActivityAccess = 9;
//
bool showTitle = 10;
//UP主操作标志
bool showUpAction = 11;
//
int64 switcherType = 12;
//
bool inputDisable = 13;
//
string rootText = 14;
//
string childText = 15;
//
int64 count = 16;
//
string title = 17;
}
//
message Notice {
//
int64 id = 1;
//
string content = 2;
//
string link = 3;
}
//
message Lottery {
//
int64 lotteryId = 1;
//
int64 lotteryStatus = 2;
//
int64 lotteryMid = 3;
//
int64 lotteryTime = 4;
//
int64 oid = 5;
//
int64 type = 6;
//
int64 ctime = 7;
//
Content content = 8;
//
Member member = 9;
//
ReplyControl replyControl = 10;
}
//
message Activity {
//
int64 activityId = 1;
//
int64 activityState = 2;
//
string activityPlaceholder = 3;
}
//
message UpSelection {
//
int64 pendingCount = 1;
//
int64 ignoreCount = 2;
}
//
message CM {
//
google.protobuf.Any sourceContent = 1;
}
//
message ArticleSearchItem {
//
string title = 1;
//
string upNickname = 2;
//
repeated string covers = 3;
}
//
message GoodsSearchItem {
//
int64 id = 1;
//
string name = 2;
//
string price = 3;
//
string income = 4;
//
string img = 5;
//
string label = 6;
}
//
enum VideoItemCase {
//
VIDEOITEM_NOT_SET = 0;
//
UGC = 2;
//
PGC = 3;
}
//
message UGCVideoSearchItem {
//
string title = 1;
//
string upNickname = 2;
//
int64 duration = 3;
//
string cover = 4;
}
//
message PGCVideoSearchItem {
//
string title = 1;
//
string category = 2;
//
string cover = 3;
}
//
message VideoSearchItem {
//
VideoItemCase type = 1;
//
UGCVideoSearchItem UGCVideo = 2;
//
PGCVideoSearchItem PGCVideo = 3;
}
//
enum ItemCase {
//
ITEM_NOT_SET = 0;
//
GOODS = 2;
//
VIDEO = 3;
//
ARTICLE = 4;
}
//
message SearchItem {
//
string url = 1;
//
GoodsSearchItem goods = 2;
//
VideoSearchItem video = 3;
//
ArticleSearchItem article = 4;
}
//
message SearchItemReplyExtraInfo {
//
string eventId = 1;
}

View File

@ -0,0 +1,660 @@
syntax = "proto3";
package bilibili.main.community.reply.v1;
import "google/protobuf/any.proto";
//
service Reply {
//
rpc MainList(MainListReq) returns (MainListReply);
//
rpc DetailList(DetailListReq) returns (DetailListReply);
//
rpc DialogList(DialogListReq) returns (DialogListReply);
//
rpc PreviewList (PreviewListReq) returns (PreviewListReply);
// item前置发布接口
rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply);
//
rpc SearchItem(SearchItemReq) returns (SearchItemReply);
}
// 广
message CM {
// 广()
google.protobuf.Any sourceContent = 1;
}
// -
message DialogListReq {
// id
int64 oid = 1;
//
int64 type = 2;
// rpid
int64 root = 3;
// rpid
int64 rpid = 4;
//
CursorReq cursor = 5;
}
// -
message DialogListReply {
//
CursorReply cursor = 1;
//
SubjectControl subjectControl = 2;
//
repeated ReplyInfo replies = 3;
//
Activity activity = 4;
}
//
enum DetailListScene {
//
REPLY = 0;
//
MSG_FEED = 1;
}
// -
message DetailListReq {
// id
int64 oid = 1;
//
int64 type = 2;
// rpid
int64 root = 3;
// rpid
int64 rpid = 4;
//
CursorReq cursor = 5;
//
DetailListScene scene = 6;
}
// -
message DetailListReply {
//
CursorReply cursor = 1;
//
SubjectControl subjectControl = 2;
// ()
ReplyInfo root = 3;
//
Activity activity = 4;
}
// -
message MainListReq {
// id
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
// json
string extra = 4;
// 广json
string adExtra = 5;
// rpid
int64 rpid = 6;
}
// -
message PreviewListReq {
// id
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
}
//
message ReplyExtra {
//
int64 season_id = 1;
//
int64 season_type = 2;
//
int64 ep_id = 3;
//
bool is_story = 4;
}
// -
message PreviewListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
// UP置顶评论
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
}
// -
message MainListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
// UP置顶评论
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
//
Notice notice = 7;
//
Lottery lottery = 8;
//
Activity activity = 9;
//
UpSelection upSelection = 10;
// 广
CM cm = 11;
//
Effects effects = 12;
}
//
message Effects {
//
string preloading = 1;
}
//
message UpSelection {
//
int64 pendingCount = 1;
//
int64 ignoreCount = 2;
}
//
message Notice {
//
int64 id = 1;
//
string content = 2;
//
string link = 3;
}
//
message Activity {
// id
int64 activityId = 1;
//
// -1: 1:线
int64 activityState = 2;
//
string activityPlaceholder = 3;
}
//
message Lottery {
// id
int64 lotteryId = 1;
//
// 0: 1: 2:
int64 lotteryStatus = 2;
// mid
int64 lotteryMid = 3;
//
int64 lotteryTime = 4;
//
int64 oid = 5;
//
int64 type = 6;
//
int64 ctime = 7;
//
Content content = 8;
//
Member member = 9;
//
ReplyControl replyControl = 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 upMid = 1;
//
bool isAssist = 2;
//
bool readOnly = 3;
//
bool hasVoteAccess = 4;
//
bool hasLotteryAccess = 5;
//
bool hasFoldedReply = 6;
//
string bgText = 7;
// UP拉黑
bool upBlocked = 8;
//
bool hasActivityAccess = 9;
//
bool showTitle = 10;
// UP主操作标志
bool showUpAction = 11;
//
int64 switcherType = 12;
//
bool inputDisable = 13;
//
string rootText = 14;
//
string childText = 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 replyControl = 14;
}
//
message Content {
//
string message = 1;
//at到的用户信息
map<string,Member> menber = 2;
//
map<string,Emote> emote = 3;
//
map<string,Topic> topic = 4;
//
map<string,Url> url = 5;
//
Vote vote = 6;
}
//
message ReplyControl {
//
// 0: 1: 2:
int64 action = 1;
// UP觉得很赞
bool upLike = 2;
// UP回复
bool upReply = 3;
//
bool showFollowBtn = 4;
//
bool isAssist = 5;
//
string labelText = 6;
//
bool following = 7;
//
bool followed = 8;
//
bool blocked = 9;
//
bool hasFoldedReply = 10;
//
bool isFoldedReply = 11;
// UP置顶
bool isUpTop = 12;
//
bool isAdminTop = 13;
//
bool isVoteTop = 14;
//
int64 maxLine = 15;
//
bool invisible = 16;
// up签订契约
bool is_contractor = 17;
//
bool is_note = 18;
}
//
message Url {
//
string title = 1;
//
int64 state = 2;
// url
string prefixIcon = 3;
//
string appUrlSchema = 4;
//
string appName = 5;
//
string appPackageName = 6;
// id
string clickReport = 7;
}
//
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 Member {
/**********基础信息**********/
// mid
int64 mid = 1;
//
string name = 2;
//
string sex = 3;
// url
string face = 4;
//
int64 level = 5;
//
int64 officialVerifyType = 6;
/**********VIP相关**********/
//
// 0: 1: 2:
int64 vipType = 7;
//
int64 vipStatus = 8;
//
int64 vipThemeType = 9;
// url
string vipLabelPath = 10;
/**********装扮相关**********/
// url
string garbPendantImage = 11;
// url
string garbCardImage = 12;
// url
string garbCardImageWithFocus = 13;
// url
string garbCardJumpUrl = 14;
// id
string garbCardNumber = 15;
// id显示颜色
string garbCardFanColor = 16;
//
bool garbCardIsFan = 17;
/**********粉丝勋章相关**********/
//
string fansMedalName = 18;
//
int64 fansMedalLevel = 19;
//
int64 fansMedalColor = 20;
//
string vip_nickname_color = 21;
//
// 0: 1: 2:绿
int32 vip_avatar_subscript = 22;
//
string vip_label_text = 23;
//
string vip_label_theme = 24;
}
//
enum SearchItemType {
//
DEFAULT_ITEM_TYPE = 0;
//
GOODS_VALUE = 1;
//
VIDEO_VALUE = 2;
//
ARTICLE_VALUE = 3;
}
//
enum SearchItemVideoSubType {
//
UGC = 0;
//
PGC = 1;
}
// item前置发布-
message SearchItemPreHookReq {
// id
int64 oid = 1;
//
int64 type = 2;
}
// item前置发布-
message SearchItemPreHookReply {
//
string placeholderText = 1;
//
string backgroundText = 2;
// tab栏的顺序
repeated SearchItemType orderedType = 3;
}
// -
message SearchItemReq {
//
SearchItemCursorReq cursor = 1;
//id
int64 oid = 2;
//
int64 type = 3;
//
string keyword = 4;
}
//
message SearchItemReplyExtraInfo {
//
string eventId = 1;
}
// -
message SearchItemReply {
//
SearchItemCursorReply cursor = 1;
//
repeated SearchItem items = 2;
//
SearchItemReplyExtraInfo extra = 3;
}
//
message SearchItemCursorReq {
//
int64 next = 1;
// tab类型
SearchItemType itemType = 2;
}
//
message SearchItemCursorReply {
//
bool hasNext = 1;
//
int64 next = 2;
}
//
message SearchItem {
//
string url = 1;
//
oneof item {
//
GoodsSearchItem goods = 2;
//
VideoSearchItem video = 3;
//
ArticleSearchItem article = 4;
}
}
//
message GoodsSearchItem {
// id
int64 id = 1;
//
string name = 2;
//
string price = 3;
//
string income = 4;
//
string img = 5;
//
string label = 6;
}
//
message VideoSearchItem {
//
SearchItemVideoSubType type = 1;
//
oneof video_item {
// UGC视频
UGCVideoSearchItem ugc = 2;
// PGC视频
PGCVideoSearchItem pgc = 3;
}
}
// UGC视频项目
message UGCVideoSearchItem {
//
string title = 1;
// UP主昵称
string upNickname = 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 upNickname = 2;
//
repeated string covers = 3;
}

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,5 @@
# grpc接口定义protobuf结构体
- `comp_proto.bat`---win递归批量编译脚本
- `conp_proto.sh`---linux递归编译脚本
注:
1. proto结构体文件按照包名分类同级放在同一目录中