From 555f7ae056ef5315b0c67c75f3915f68ed94bcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E6=98=93=E5=A7=90QwQ?= <45892418+SocialSisterYi@users.noreply.github.com> Date: Fri, 11 Jun 2021 01:03:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=83=A8=E5=88=86proto?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BD=93=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grpc_api/bilibili/account/fission/v1.proto | 62 - .../bilibili/account/fission/v1/fission.proto | 48 + .../bilibili/ad/{v1.proto => v1/ad.proto} | 0 grpc_api/bilibili/api/player/v1.proto | 103 - .../api/probe/{v1.proto => v1/probe.proto} | 40 +- .../app/archive/middleware/v1/preload.proto | 16 + grpc_api/bilibili/app/archive/v1.proto | 243 --- .../bilibili/app/archive/v1/archive.proto | 178 ++ grpc_api/bilibili/app/view/v1.proto | 1665 ----------------- grpc_api/bilibili/app/view/v1/view.proto | 1454 ++++++++++++++ grpc_api/bilibili/app/wall/v1.proto | 42 - grpc_api/bilibili/app/wall/v1/wall.proto | 38 + grpc_api/bilibili/metadata.proto | 184 -- .../bilibili/metadata/device/device.proto | 39 + .../bilibili/metadata/fawkes/fawkes.proto | 19 + .../bilibili/metadata/locale/locale.proto | 26 + grpc_api/bilibili/metadata/metadata.proto | 22 + .../bilibili/metadata/network/network.proto | 35 + .../metadata/restriction/restriction.proto | 22 + grpc_api/bilibili/rpc.proto | 18 - grpc_api/bilibili/rpc/status.proto | 16 + grpc_api/comp_proto.bat | 10 - grpc_api/comp_proto.sh | 6 - 23 files changed, 1926 insertions(+), 2360 deletions(-) delete mode 100644 grpc_api/bilibili/account/fission/v1.proto create mode 100644 grpc_api/bilibili/account/fission/v1/fission.proto rename grpc_api/bilibili/ad/{v1.proto => v1/ad.proto} (100%) delete mode 100644 grpc_api/bilibili/api/player/v1.proto rename grpc_api/bilibili/api/probe/{v1.proto => v1/probe.proto} (64%) create mode 100644 grpc_api/bilibili/app/archive/middleware/v1/preload.proto delete mode 100644 grpc_api/bilibili/app/archive/v1.proto create mode 100644 grpc_api/bilibili/app/archive/v1/archive.proto delete mode 100644 grpc_api/bilibili/app/view/v1.proto create mode 100644 grpc_api/bilibili/app/view/v1/view.proto delete mode 100644 grpc_api/bilibili/app/wall/v1.proto create mode 100644 grpc_api/bilibili/app/wall/v1/wall.proto delete mode 100644 grpc_api/bilibili/metadata.proto create mode 100644 grpc_api/bilibili/metadata/device/device.proto create mode 100644 grpc_api/bilibili/metadata/fawkes/fawkes.proto create mode 100644 grpc_api/bilibili/metadata/locale/locale.proto create mode 100644 grpc_api/bilibili/metadata/metadata.proto create mode 100644 grpc_api/bilibili/metadata/network/network.proto create mode 100644 grpc_api/bilibili/metadata/restriction/restriction.proto delete mode 100644 grpc_api/bilibili/rpc.proto create mode 100644 grpc_api/bilibili/rpc/status.proto delete mode 100644 grpc_api/comp_proto.bat delete mode 100644 grpc_api/comp_proto.sh diff --git a/grpc_api/bilibili/account/fission/v1.proto b/grpc_api/bilibili/account/fission/v1.proto deleted file mode 100644 index 915c3fba76..0000000000 --- a/grpc_api/bilibili/account/fission/v1.proto +++ /dev/null @@ -1,62 +0,0 @@ -syntax = "proto3"; - -package bilibili.account.fission.v1; - -//Fission裂变 -service Fission { - //活动入口 - // - rpc entrance (EntranceReq) returns (EntranceReply); - - //首页弹窗 - // - rpc window (WindowReq) returns (WindowReply); -} - -//活动入口-请求 -message EntranceReq { - -} - -//活动入口-回复 -message EntranceReply { - //展示图标 - string icon = 1; - - //活动名称 - string name = 2; - - //活动跳转链接 - string url = 3; - - //动画效果 - AnimateIcon animateIcon = 4; -} - -//首页弹窗-请求 -message WindowReq { - -} - -//首页弹窗-回复 -message WindowReply { - //弹窗类型 - //0:弹窗 - //1:普通页面 - int32 type = 1; - - //跳转链接 - string url = 2; - - // - string reportData = 3; -} - -// -message AnimateIcon { - //icon文件 - string icon = 1; - - //动效json文件 - string json = 2; -} \ No newline at end of file diff --git a/grpc_api/bilibili/account/fission/v1/fission.proto b/grpc_api/bilibili/account/fission/v1/fission.proto new file mode 100644 index 0000000000..6b6d0a43f8 --- /dev/null +++ b/grpc_api/bilibili/account/fission/v1/fission.proto @@ -0,0 +1,48 @@ +syntax = "proto3"; + +package bilibili.account.fission.v1; + +//Fission裂变 +service Fission { + // 活动入口 + rpc Entrance (EntranceReq) returns (EntranceReply); + // 首页弹窗 + rpc Window (WindowReq) returns (WindowReply); +} + +// 活动入口-请求 +message EntranceReq {} + +// 活动入口-响应 +message EntranceReply { + // 展示图标 + string icon = 1; + // 活动名称 + string name = 2; + // 活动跳转链接 + string url = 3; + // 动画效果 + AnimateIcon animateIcon = 4; +} + +// 首页弹窗-请求 +message WindowReq {} + +//首页弹窗-响应 +message WindowReply { + // 弹窗类型 + // 0:弹窗 1:普通页面 + int32 type = 1; + // 跳转链接 + string url = 2; + // 上报数据字段 + string reportData = 3; +} + +//动画效果 +message AnimateIcon { + // icon文件 + string icon = 1; + // 动效json文件 + string json = 2; +} \ No newline at end of file diff --git a/grpc_api/bilibili/ad/v1.proto b/grpc_api/bilibili/ad/v1/ad.proto similarity index 100% rename from grpc_api/bilibili/ad/v1.proto rename to grpc_api/bilibili/ad/v1/ad.proto diff --git a/grpc_api/bilibili/api/player/v1.proto b/grpc_api/bilibili/api/player/v1.proto deleted file mode 100644 index 7169715f1d..0000000000 --- a/grpc_api/bilibili/api/player/v1.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package bilibili.api.player.v1; - -// -service Heartbeat { - // - // - rpc mobile (HeartbeatReq) returns (HeartbeatReply); -} - -//-请求 -message HeartbeatReq { - // - int64 serverTime = 1; - - // - string session = 2; - - // - int64 mid = 3; - - // - int64 aid = 4; - - // - int64 cid = 5; - - // - string sid = 6; - - // - int64 epid = 7; - - // - string type = 8; - - // - int32 subType = 9; - - // - int32 quality = 10; - - // - int64 totalTime = 11; - - // - int64 pausedTime = 12; - - // - int64 playedTime = 13; - - // - int64 videoDuration = 14; - - // - string playType = 15; - - // - int64 networkType = 16; - - // - int64 lastPlayProgressTime = 17; - - // - int64 maxPlayProgressTime = 18; - - // - int32 from = 19; - - // - string fromSpmid = 20; - - // - string spmid = 21; - - // - string epidStatus = 22; - - // - string playStatus = 23; - - // - string userStatus = 24; - - // - int64 actualPlayedTime = 25; - - // - int32 autoPlay = 26; - - // - int64 listPlayTime = 27; - - // - int64 detailPlayTime = 28; -} - -//-回复 -message HeartbeatReply { - // - int64 ts = 1; -} \ No newline at end of file diff --git a/grpc_api/bilibili/api/probe/v1.proto b/grpc_api/bilibili/api/probe/v1/probe.proto similarity index 64% rename from grpc_api/bilibili/api/probe/v1.proto rename to grpc_api/bilibili/api/probe/v1/probe.proto index c507107af7..edfeae0f32 100644 --- a/grpc_api/bilibili/api/probe/v1.proto +++ b/grpc_api/bilibili/api/probe/v1/probe.proto @@ -5,79 +5,65 @@ package bilibili.api.probe.v1; // service Probe { // + rpc TestCode (CodeReq) returns (CodeReply); // - rpc testCode (CodeReq) returns (CodeReply); - - // - // - rpc testReq (ProbeReq) returns (ProbeReply); - - // + rpc TestReq (ProbeReq) returns (ProbeReply); // - rpc testStream (ProbeStreamReq) returns (ProbeStreamReply); - + rpc TestStream (ProbeStreamReq) returns (ProbeStreamReply); // - // - rpc testSub (ProbeSubReq) returns (ProbeSubReply); + rpc TestSub (ProbeSubReq) returns (ProbeSubReply); } -//-请求 +// message CodeReq { // int64 code = 1; } -//-回复 -message CodeReply { - -} +// +message CodeReply {} -//-请求 +// message ProbeReq { // int64 mid = 1; - // string buvid = 2; } -//-回复 +// message ProbeReply { // string content = 1; - // int64 timestamp = 2; } -//-请求 +// message ProbeStreamReq { // int64 mid = 1; - // int64 sequence = 2; } -//-回复 +// message ProbeStreamReply { // int64 sequence = 1; - // int64 timestamp = 2; - // string content = 3; } -//-请求 +// message ProbeSubReq { // int64 buvid = 1; } -//-回复 +// message ProbeSubReply { // int64 messageId = 1; diff --git a/grpc_api/bilibili/app/archive/middleware/v1/preload.proto b/grpc_api/bilibili/app/archive/middleware/v1/preload.proto new file mode 100644 index 0000000000..e5b01e0172 --- /dev/null +++ b/grpc_api/bilibili/app/archive/middleware/v1/preload.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package bilibili.app.archive.middleware.v1; + +// 视频秒开参数 +message PlayerArgs { + // 清晰度 + int64 qn = 1; + // 流版本 + int64 fnver = 2; + // 流类型 + int64 fnval = 3; + // 返回url是否强制使用域名 + // 0:不强制使用域名 1:http域名 2:https域名 + int64 force_host = 4; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/archive/v1.proto b/grpc_api/bilibili/app/archive/v1.proto deleted file mode 100644 index faeea040b0..0000000000 --- a/grpc_api/bilibili/app/archive/v1.proto +++ /dev/null @@ -1,243 +0,0 @@ -//稿件信息v1模块 -syntax = "proto3"; - -package bilibili.app.archive.v1; - -//稿件基本信息 -message Arc{ - //稿件avid - int64 aid = 1; - - //稿件分P数 - int64 videos = 2; - - //分区tid - int32 typeId = 3; - - //二级分区名 - string typeName = 4; - - //稿件版权 - //1:原创 2:转载 - int32 copyright = 5; - - //稿件封面url - string pic = 6; - - //稿件标题 - string title = 7; - - //稿件发布时间 - int64 pubdate = 8; - - //用户投稿时间 - int64 ctime = 9; - - //稿件简介 - string desc = 10; - - //稿件状态 - int32 state = 11; - - //访问属性 - //0:全部可见 10000:登录可见 - int32 access = 12; - - //属性位配置 - int32 attribute = 13; - - //空 - string tag = 14; - - //空 - repeated string tags = 15; - - //稿件总时长 - int64 duration = 16; - - //参与的活动id - int64 missionId = 17; - - //绑定的商单id - int64 orderId = 18; - - //pgc稿件强制重定向url - string redirectUrl = 19; - - //??? - int64 forward = 20; - - //控制标志 - Rights rights = 21; - - //UP主信息 - Author author = 22; - - //状态数 - Stat stat = 23; - - //??? - string reportResult = 24; - - //投稿时发送的动态内容 - string dynamic = 25; - - //稿件1P cid - int64 firstCid = 26; - - //稿件1P 分辨率 - Dimension dimension = 27; - - //合作组成员列表 - repeated StaffInfo staffInfo = 28; - - //ugc合集id - int64 seasonId = 29; - - //新版属性位配置 - int64 attributeV2 = 30; -} - -//作者信息 -message Author{ - //UID - int64 mid = 1; - - //昵称 - string name = 2; - - //头像url - string face = 3; -} - -//分辨率信息 -message Dimension{ - //宽度 - int64 width = 1; - - //高度 - int64 height = 2; - - //方向 - //0:横屏 1:竖屏 - int64 rotate = 3; -} - -//分P视频 -message Page{ - //视频cid - int64 cid = 1; - - //分P序号 - int32 page = 2; - - //源类型 - //vupload:B站 qq:腾讯 hunan:芒果 - string from = 3; - - //分P标题 - string part = 4; - - //分P时长 - int64 duration = 5; - - //外链vid - string vid = 6; - - //分P简介 - string desc = 7; - - //外链url - string webLink = 8; - - //分P分辨率 - Dimension dimension = 9; -} - -//稿件控制标志 -message Rights{ - //老版是否付费 - int32 bp = 1; - - //允许充电 - int32 elec = 2; - - //允许下载 - int32 download = 3; - - //是否电影 - int32 movie = 4; - - //pgc稿件需要付费 - int32 pay = 5; - - //是否高码率 - int32 hd5 = 6; - - //是否显示禁止转载标志 - int32 noReprint = 7; - - //是否允许自动播放 - int32 autoplay = 8; - - //ugc稿件需要付费 - int32 ugcPay = 9; - - //是否合作视频 - int32 isCooperation = 10; - - //是否ugc付费预览 - int32 ugcPayPreview = 11; - - //是否禁止后台播放 - int32 noBackground = 12; -} - -//合作成员信息 -message StaffInfo{ - //成员UID - int64 mid = 1; - - //成员角色 - string title = 2; - - //属性位 - int64 attribute = 3; -} - -//状态数 -message Stat{ - //稿件avid - int64 aid = 1; - - //播放数 - int32 view = 2; - - //弹幕数 - int32 danmaku = 3; - - //评论数 - int32 reply = 4; - - //收藏数 - int32 fav = 5; - - //投币数 - int32 coin = 6; - - //分享数 - int32 share = 7; - - //当前排名 - int32 nowRank = 8; - - //历史最高排名 - int32 hisRank = 9; - - //点赞数 - int32 like = 10; - - //点踩数 - //前端恒为0 - int32 dislike = 11; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/archive/v1/archive.proto b/grpc_api/bilibili/app/archive/v1/archive.proto new file mode 100644 index 0000000000..22f25a4498 --- /dev/null +++ b/grpc_api/bilibili/app/archive/v1/archive.proto @@ -0,0 +1,178 @@ +syntax = "proto3"; + +package bilibili.app.archive.v1; + +// 稿件基本信息 +message Arc{ + // 稿件avid + int64 aid = 1; + // 稿件分P数 + int64 videos = 2; + // 分区id + int32 typeId = 3; + // 二级分区名 + string typeName = 4; + // 稿件类型 + // 1:原创 2:转载 + int32 copyright = 5; + // 稿件封面url + string pic = 6; + // 稿件标题 + string title = 7; + // 稿件发布时间 + int64 pubdate = 8; + // 用户投稿时间 + int64 ctime = 9; + // 稿件简介 + string desc = 10; + // 稿件状态 + int32 state = 11; + // 访问属性 + // 0:全部可见 10000:登录可见 + int32 access = 12; + // 属性位配置(现在无了) + int32 attribute = 13; + // + string tag = 14; + // + repeated string tags = 15; + // 稿件总时长(单位为秒) + int64 duration = 16; + // 参与的活动id + int64 missionId = 17; + // 绑定的商单id + int64 orderId = 18; + // PGC稿件强制重定向url(如番剧、影视) + string redirectUrl = 19; + // + int64 forward = 20; + // 控制标志 + Rights rights = 21; + // UP主信息 + Author author = 22; + // 状态数 + Stat stat = 23; + // + string reportResult = 24; + // 投稿时发送的动态内容 + string dynamic = 25; + // 稿件1P cid + int64 firstCid = 26; + // 稿件1P 分辨率 + Dimension dimension = 27; + // 合作组成员列表 + repeated StaffInfo staffInfo = 28; + // UGC合集id + int64 seasonId = 29; + // 新版属性位配置(也没用) + int64 attributeV2 = 30; +} + +// UP主信息 +message Author{ + // UP主mid + int64 mid = 1; + // UP主昵称 + string name = 2; + // UP主头像url + string face = 3; +} + +// 分辨率 +message Dimension{ + // 宽度 + int64 width = 1; + // 高度 + int64 height = 2; + // 方向 + // 0:横屏 1:竖屏 + int64 rotate = 3; +} + +// 分P信息 +message Page{ + // 视频cid + int64 cid = 1; + // 分P序号 + int32 page = 2; + // 源类型 + // vupload:B站 qq:腾讯 hunan:芒果 + string from = 3; + // 分P标题 + string part = 4; + // 分P时长(单位为秒) + int64 duration = 5; + // 外链vid + string vid = 6; + // 分P简介 + string desc = 7; + // 外链url + string webLink = 8; + // 分P分辨率 + Dimension dimension = 9; +} + +// 稿件控制标志 +message Rights{ + // 老版是否付费 + int32 bp = 1; + // 允许充电 + int32 elec = 2; + // 允许下载 + int32 download = 3; + // 是否电影 + int32 movie = 4; + // PGC稿件需要付费 + int32 pay = 5; + // 是否高码率 + int32 hd5 = 6; + // 是否禁止转载标志 + int32 noReprint = 7; + // 是否允许自动播放 + int32 autoplay = 8; + // UGC稿件需要付费 + int32 ugcPay = 9; + // 是否联合投稿 + int32 isCooperation = 10; + // 是否UGC付费预览 + int32 ugcPayPreview = 11; + // 是否禁止后台播放 + int32 noBackground = 12; +} + +// 合作成员信息 +message StaffInfo{ + // 成员mid + int64 mid = 1; + // 成员角色 + string title = 2; + // 属性位 + // 0:普通 1:赞助商金色标志 + int64 attribute = 3; +} + +// 状态数 +message Stat{ + // 稿件avid + int64 aid = 1; + // 播放数 + int32 view = 2; + // 弹幕数 + int32 danmaku = 3; + // 评论数 + int32 reply = 4; + // 收藏数 + int32 fav = 5; + // 投币数 + int32 coin = 6; + // 分享数 + int32 share = 7; + // 当前排名 + int32 nowRank = 8; + // 历史最高排名 + int32 hisRank = 9; + // 点赞数 + int32 like = 10; + // 点踩数(前端不可见故恒为0) + int32 dislike = 11; +} \ No newline at end of file diff --git a/grpc_api/bilibili/app/view/v1.proto b/grpc_api/bilibili/app/view/v1.proto deleted file mode 100644 index 1c915c62f4..0000000000 --- a/grpc_api/bilibili/app/view/v1.proto +++ /dev/null @@ -1,1665 +0,0 @@ -//视频页v1接口 -syntax = "proto3"; -package bilibili.app.view.v1; - -import "google/protobuf/any.proto"; -import "bilibili/app/archive/v1.proto"; -import "bilibili/app/playurl/v1.proto"; - -service View { - // - // - rpc addContract (AddContractReq) returns (NoReply); - - // - // - rpc clickActivitySeason (ClickActivitySeasonReq) returns (NoReply); - - // - // - rpc clickPlayerCard (ClickPlayerCardReq) returns (NoReply); - - // - // - rpc exposePlayerCard (ExposePlayerCardReq) returns (NoReply); - - // - // - rpc season (SeasonReq) returns (SeasonReply); - - // - // - rpc shortFormVideoDownload (ShortFormVideoDownloadReq) returns (ShortFormVideoDownloadReply); - - //视频页信息 - //https://app.bilibili.com/bilibili.app.view.v1.View/View - rpc view (ViewReq) returns (ViewReply); - - //稿件特殊数据 - //https://app.bilibili.com/bilibili.app.view.v1.View/ViewProgress - rpc viewProgress (ViewProgressReq) returns (ViewProgressReply); -} - -//-请求 -message AddContractReq { - // - int64 aid = 1; - - // - int64 upMid = 2; - - // - string spmid = 3; -} - -//-请求 -message ClickActivitySeasonReq { - // - BizType orderType = 1; - - // - string spmid = 2; - - oneof orderParamCase { - // - BizReserveActivityParam bizReserveActivityParam = 3; - - // - BizFavSeasonParam bizFavSeasonParam = 4; - } - - // - int64 action = 5; -} - -//-请求 -message ClickPlayerCardReq { - // - int64 id = 1; - - // - int64 aid = 2; - - // - int64 cid = 3; - - // - int64 action = 4; - - // - string spmid = 5; -} - -//-请求 -message ExposePlayerCardReq { - // - PlayerCardType cardType = 1; - - // - int64 aid = 2; - - // - int64 cid = 3; - - // - string spmid = 4; -} - -//-请求 -message SeasonReq { - // - int64 seasonId = 1; -} - -//-回复 -message SeasonReply { - // - UgcSeason season = 1; -} - -//-请求 -message ShortFormVideoDownloadReq{ - int64 aid = 1; - int64 cid = 2; - int64 mid = 3; - string buvid = 4; - string mobiApp = 5; - int64 build = 6; - string device = 7; - string platform = 8; - string spmid = 9; -} - -//-回复 -message ShortFormVideoDownloadReply{ - bool hasDownloadUrl = 1; - string downloadUrl = 2; - string md5 = 3; - int64 size = 4; -} - -//视频页信息-请求 -message ViewReq { - //稿件avid - int64 aid = 1; - - //稿件bvid - string bvid = 2; - - // - string from = 3; - - // - string trackid = 4; - - // - string adExtra = 5; - - //清晰度 - int32 qn = 6; - - // - int32 fnver = 7; - - //流类型 - int32 fnval = 8; - - //是否强制使用域名 - int32 forceHost = 9; - - //是否允许4K - int32 fourk = 10; - - // - string spmid = 11; - - // - string fromSpmid = 12; - - // - int32 autoplay = 13; - - // - bilibili.app.playurl.v1.PlayerArgs playerArgs = 14; -} - -//视频页信息-回复 -message ViewReply { - //稿件信息 - bilibili.app.archive.v1.Arc arc = 1; - - //分P信息 - repeated ViewPage pages = 2; - - //UP主扩展信息 ("OnwerExt"为源码中拼写错误) - OnwerExt ownerExt = 3; - - //用户操作状态 - ReqUser reqUser = 4; - - //稿件TAG - repeated Tag tag = 5; - - //TAG对应的图标 - map tIcon = 6; - - //稿件映射的剧集信息 - Season season = 7; - - //充电排行信息 - ElecRank elecRank = 8; - - //历史观看进度 - History history = 9; - - //视频相关推荐列表 - repeated Relate relates = 10; - - //不感兴趣原因 - Dislike dislike = 11; - - //播放图标动画配置档 - PlayerIcon playerIcon = 12; - - // - string vipActive = 13; - - //稿件bvid - string bvid = 14; - - //获得荣誉信息 - Honor honor = 15; - - // - repeated RelateTab relateTab = 16; - - //参与的活动页面url - string activityUrl = 17; - - //稿件引用bgm列表 - repeated Bgm bgm = 18; - - //联合投稿成员列表 - repeated Staff staff = 19; - - //争议信息 - string argueMsg = 20; - - //短链接 - string shortLink = 21; - - // - int32 playParam = 22; - - // - Label label = 23; - - //ugc视频合集信息 - UgcSeason ugcSeason = 24; - - //配置? - Config config = 25; - - //分享副标题(已观看xxx次) - string shareSubtitle = 26; - - // - Interaction interaction = 27; - - //错误码 - //0:正常 1:视频被UP主删除 - int32 ecode = 28; - - //404页信息 - CustomConfig customConfig = 29; - - //广告 - repeated CM cms = 30; - - //广告配置? - CMConfig cmConfig = 31; - - // - Tab tab = 32; - - // - Rank rank = 33; - - //免流相关信息? - TFPanelCustomized tfPanelCustomized = 34; - - // - UpAct upAct = 35; - - // - UserGarb userGarb = 36; - - // - ActivitySeason activitySeason = 37; -} - -//稿件特殊数据-请求 -message ViewProgressReq{ - //稿件avid - int64 aid = 1; - - //视频cid - int64 cid = 2; - - //UP主uid - int64 upMid = 3; -} - -//稿件特殊数据-回复 -message ViewProgressReply{ - //稿件特殊数据 - VideoGuide videoGuide = 1; - - //资源包 - Chronos chronos = 2; -} - -//空回复 -message NoReply{ - -} - -// -message ActivityResource{ - // - string modPoolName = 1; - - // - string modResourceName = 2; - - // - string bgColor = 3; - - // - string selectedBgColor = 4; - - // - string textColor = 5; - - // - string lightTextColor = 6; - - // - string darkTextColor = 7; - - // - string dividerColor = 8; -} - -message ActivitySeason { - // - bilibili.app.archive.v1.Arc arc = 1; - - // - repeated ViewPage pages = 2; - - //("OnwerExt"为源码中拼写错误) - OnwerExt ownerExt = 3; - - // - ReqUser reqUser = 4; - - // - ElecRank elecRank = 5; - - // - History history = 6; - - // - string bvid = 7; - - // - Honor honor = 8; - - // - repeated Staff staff = 9; - - // - UgcSeason ugcSeason = 10; - - // - Tab tab = 11; - - // - Rank rank = 12; - - // - Order order = 13; - - // - bool supportDislike = 14; - - // - OperationRelate operationRelate = 15; - - // - ActivityResource activityResource = 16; - - // - string shortLink = 17; - - // - Label label = 18; - - // - Dislike dislike = 19; - - // - PlayerIcon playerIcon = 20; - - // - string shareSubtitle = 21; - - // - CMConfig cmConfig = 22; - - // - TFPanelCustomized tfPanelCustomized = 23; - - // - string argueMsg = 24; - - // - ECode ecode = 25; - - // - CustomConfig customConfig = 26; -} - -// -message Attention{ - // - int32 startTime = 1; - - // - int32 endTime = 2; - - // - double posX = 3; - - // - double posY = 4; -} - -//音频稿件信息 -message Audio{ - //音频标题 - string title = 1; - - //音频封面url - string coverUrl = 2; - - //音频auid - int64 songId = 3; - - //音频播放量 - int64 playCount = 4; - - //音频评论数 - int64 replyCount = 5; - - //音频作者UID - int64 upperId = 6; - - //进入按钮文案 - string entrance = 7; - - // - int64 songAttr = 8; -} - -//视频引用的bgm音频 -message Bgm { - //音频auid - int64 sid = 1; - - //音频作者UID - int64 mid = 2; - - //音频标题 - string title = 3; - - //音频作者昵称 - string author = 4; - - //bgm页面url - string jumpUrl = 5; - - //音频封面url - string cover = 6; -} - -// -message BizFavSeasonParam{ - // - int64 seasonId = 1; -} - -// -message BizFollowVideoParam{ - // - int64 seasonId = 1; -} - -// -message BizJumpLinkParam{ - // - string url = 1; -} - -// -message BizReserveActivityParam{ - // - int64 activityId = 1; - - // - string from = 2; - - // - string type = 3; - - // - int64 oid = 4; -} - -// -enum BizType{ - // - BizTypeNone = 0; - - // - BizTypeFollowVideo = 1; - - // - BizTypeReserveActivity = 2; - - // - BizTypeJumpLink = 3; - - // - BizTypeFavSeason = 4; -} - -// -message Button{ - //按钮文案 - string title = 1; - - //跳转uri - string uri = 2; -} - -// -message CM{ - // - google.protobuf.Any sourceContent = 1; -} - -// -message CMConfig { - // - google.protobuf.Any adsControl = 1; -} - -// -message Chronos{ - // - string md5 = 1; - - // - string file = 2; -} - -//互动弹幕条目信息 -message CommandDm{ - //弹幕id - int64 id = 1; - - //对象视频cid - int64 oid = 2; - - //??? - string mid = 3; - - //互动弹幕指令 - string command = 4; - - //互动弹幕正文 - string content = 5; - - //出现时间 - int32 progress = 6; - - //创建时间 - string ctime = 7; - - //发布时间 - string mtime = 8; - - //扩展json数据 - string extra = 9; - - //弹幕id-str - string idStr = 10; -} - -//配置? -message Config { - //下方推荐项标题 - string relatesTitle = 1; - - // - int32 relatesStyle = 2; - - // - int32 relateGifExp = 3; - - // - int32 endPageHalf = 4; - - // - int32 endPageFull = 5; - - // - bool autoSwindow = 6; -} - -// -message ContractCard { - // - float displayProgress = 1; - - // - int64 displayAccuracy = 2; - - // - int64 displayDuration = 3; -} - -//404页信息 -message CustomConfig { - //重定向页面url - string redirectUrl = 1; -} - -//分P弹幕信息 -message DM{ - //分P是否关闭弹幕 - //0:正常 1:关闭 - bool closed = 1; - - // - bool realName = 2; - - //分P弹幕总数 - int64 count = 3; -} - -//不喜欢原因 -message Dislike { - //标题 - string title = 1; - - //??? - string subtitle = 2; - - //原因项列表 - repeated DislikeReasons reasons = 3; -} - -//不喜欢原因项 -message DislikeReasons{ - //类型 - //1:全部类型 3:TAG 4:UP主 - int64 id = 1; - - //相关UP主UID - int64 mid = 2; - - //相关分区tid - int32 rid = 3; - - //相关TAG id - int64 tagId = 4; - - //相关名称 - string name = 5; -} - -// -enum ECode{ - // - DEFAULT = 0; - - // - CODE404 = 1; -} - -//充电排行信息 -message ElecRank { - //充电排行列表 - repeated ElecRankItem list = 1; - - //充电用户数 - int64 count = 2; -} - -//充电用户信息 -message ElecRankItem{ - //用户头像 - string avatar = 1; - - //用户昵称 - string nickname = 2; - - //充电留言 - string message = 3; - - //用户UID - int64 mid = 4; -} - -//视频合集单话信息 -message Episode{ - //合集单话id - int64 id = 1; - - //稿件avid - int64 aid = 2; - - //视频1P cid - int64 cid = 3; - - //稿件标题 - string title = 4; - - //稿件封面url - string cover = 5; - - //投稿时间显示文案 - string coverRightText = 6; - - //视频分P信息 - bilibili.app.archive.v1.Page page = 7; - - //视频状态数 - bilibili.app.archive.v1.Stat stat = 8; - - //稿件bvid - string bvid = 9; - - // - bilibili.app.archive.v1.Author author = 10; -} - -//稿件观看进度 -message History { - //播放进度分P cid - int64 cid = 1; - - //播放进度时间 - //0:未观看 -1:已看完 正整数:播放时间进度 - int64 progress = 2; -} - -//稿件获得荣誉信息 -message Honor { - //荣誉栏图标url - string icon = 1; - - //荣誉栏图标url 夜间模式 - string iconNight = 2; - - //荣誉文案 - string text = 3; - - //荣誉副文案 - string textExtra = 4; - - //标题颜色 - string textColor = 5; - - //标题颜色 夜间模式 - string textColorNight = 6; - - //背景颜色 - string bgColor = 7; - - //背景颜色 夜间模式 - string bgColorNight = 8; - - //跳转uri - string url = 9; - - //跳转角标文案 - string urlText = 10; -} - -// -message Interaction { - // - Node historyNode = 1; - - // - int64 graphVersion = 2; - - // - string msg = 3; - - // - string evaluation = 4; - - // - int64 mark = 5; -} - -// -message Label { - // - int32 type = 1; - - // - string uri = 2; -} - -//直播信息 -message Live{ - //主播UID - int64 mid = 1; - - //直播间id - int64 roomid = 2; - - //直播间url - string uri = 3; - - // - string endpageUri = 4; -} - -// -message Node{ - // - int64 nodeId = 1; - - // - string title = 2; - - // - int64 cid = 3; -} - -// -message Notice{ - // - string title = 1; - - // - string desc = 2; -} - -//认证信息 -message OfficialVerify{ - //认证类型 - //0:个人认证 1:官方认证 - int32 type = 1; - - //认证名称 - string desc = 2; -} - -//up主扩展信息 ("OnwerExt"为源码中拼写错误) -message OnwerExt { - //认证信息 - OfficialVerify officialVerify = 1; - - //直播信息 - Live live = 2; - - //会员信息 - Vip vip = 3; - - //??? - repeated int64 assists = 4; - - //粉丝数 - int64 fans = 5; - - //总投稿数 - string arcCount = 6; -} - -// -message OperationCard{ - // - int32 startTime = 1; - - // - int32 endTime = 2; - - // - string icon = 3; - - // - string title = 4; - - // - string buttonText = 5; - - // - string url = 6; - - // - string content = 7; -} - -//内嵌操作按钮卡片 -message OperationCardNew{ - //卡片id - int64 id = 1; - - //显示时间 - int32 from = 2; - - //消失时间 - int32 to = 3; - - // - bool status = 4; - - //卡片类型 - OperationCardType cardType = 5; - - oneof renderCase { - // - StandardCard standardCard= 6; - - // - OperationCard operationCard = 7; - } - - // - BizType bizType = 8; - - oneof paramCase { - // - BizFollowVideoParam FollowVideoParam = 9; - - // - BizReserveActivityParam ReserveActivityParam = 10; - - // - BizJumpLinkParam LinkParam = 11; - } -} - -// -enum OperationCardType{ - // - CardTypeNone = 0; - - // - CardTypeStandard = 1; - - // - CardTypeSkip = 2; -} - -// -message OperationRelate{ - // - string title = 1; - - // - repeated RelateItem relateItem = 2; -} - -// -message Order{ - // - bool status = 1; - - // - string title = 2; - - // - string buttonTitle = 3; - - // - string buttonSelectedTitle = 4; - - // - int64 seasonStatView = 5; - - // - int64 seasonStatDanmaku = 6; - - // - BizType orderType = 7; - - oneof orderParamCase{ - // - BizReserveActivityParam bizReserveActivityParam = 8; - - // - BizFavSeasonParam bizFavSeasonParam = 9; - } - - // - string intro = 10; -} - -//游戏礼包信息 -message PackInfo{ - //礼包标题 - string title = 1; - - //礼包页uri - string uri = 2; -} - -// -enum PlayerCardType { - // - PlayerCardTypeNone_VALUE = 0; - - // - PlayerCardTypeAttention_VALUE = 1; - - // - PlayerCardTypeOperation_VALUE = 2; - - // - PlayerCardTypeContract_VALUE = 3; -} - -//进度条动画配置 -message PlayerIcon { - //拖动动画配置档url - string url1 = 1; - - //拖动动画配置档hash - string hash1 = 2; - - //松手动画配置档url - string url2 = 3; - - //松手动画配置档hash - string hash2 = 4; -} - -// -message Rank{ - // - string icon = 1; - - // - string iconNight = 2; - - // - string text = 3; -} - -// -message ReasonStyle{ - // - string text = 1; - - // - string textColor = 2; - - // - string bgColor = 3; - - // - string borderColor = 4; - - // - string textColorNight = 5; - - // - string bgColorNight = 6; - - // - string borderColorNight = 7; - - // - int32 bgStyle = 8; - - // - int32 selected = 9; -} - -//相关推荐项 -message Relate { - // - int64 aid = 1; - - //封面url - string pic = 2; - - //标题 - string title = 3; - - //UP主信息 - bilibili.app.archive.v1.Author author = 4; - - //稿件状态数 - bilibili.app.archive.v1.Stat stat = 5; - - //时长 - int64 duration = 6; - - //跳转类型 - //special:pgc视频 av:稿件视频 cm:广告 game:游戏 - string goto = 7; - - //参数(如av号等) - string param = 8; - - //跳转uri - string uri = 9; - - // - string jumpUrl = 10; - - //评分 - double rating = 11; - - // - string reserve = 12; - - //来源标识 - //operation:管理员添加 - string from = 13; - - //备注 - string desc = 14; - - // - string rcmdReason = 15; - - //标志文字 - string badge = 16; - - //1P cid - int64 cid = 17; - - // - int32 seasonType = 18; - - // - int32 ratingCount = 19; - - //标签文案 - string tagName = 20; - - //游戏礼包信息 - PackInfo packInfo = 21; - - // - Notice notice = 22; - - //按钮信息 - Button button = 23; - - //spm追踪id - string trackid = 24; - - // - int32 newCard = 25; - - // - ReasonStyle rcmdReasonStyle = 26; - - // - string coverGif = 27; - - //推广信息 - CM cm = 28; - - // - int64 reserveStatus = 29; -} - -// -message RelateItem{ - // - string url = 1; - - // - string cover = 2; -} - -// -message RelateTab { - // - string id = 1; - - // - string title = 2; -} - -//用户操作状态 -message ReqUser { - //是否关注UP主 - int32 attention = 1; - - // - int32 guestAttention = 2; - - //是否收藏 - int32 favorite = 3; - - //是否点赞 - int32 like = 4; - - //是否点踩 - int32 dislike = 5; - - //是否投币 - int32 coin = 6; - - // - int32 attentionLevel = 7; - - // - int32 favSeason = 8; -} - -//剧集信息 -message Season { - // - string allowDownload = 1; - - //剧集ssid - int64 seasonId = 2; - - //是否重定向跳转 - int32 isJump = 3; - - //剧集标题 - string title = 4; - - //剧集封面url - string cover = 5; - - //剧集是否完结 - int32 isFinish = 6; - - //最新一话epid - int64 newestEpId = 7; - - //最新一话标题 - string newestEpIndex = 8; - - //总集数 - int64 totalCount = 9; - - //更新星期日 - int32 weekday = 10; - - //用户追番标志 - UserSeason userSeason = 11; - - // - SeasonPlayer player = 12; - - //单集页面url - string ogvPlayurl = 13; -} - -// -message SeasonPlayer{ - // - int64 aid = 1; - - // - string vid = 2; - - // - int64 cid = 3; - - // - string from = 4; -} - -//视频合集分段信息 -message Section{ - //合集分段id - int64 id = 1; - - //合集分段标题 - string title = 2; - - //类型? - //0:完结? 1:连载中? - int64 type = 3; - - //合集单话列表 - repeated Episode episodes = 4; -} - -//合作成员信息 -message Staff { - //成员UID - int64 mid = 1; - - //成员角色 - string title = 2; - - //成员头像url - string face = 3; - - //成员昵称 - string name = 4; - - //成员官方信息 - OfficialVerify officialVerify = 5; - - //成员会员信息 - Vip vip = 6; - - //是否关注该成员 - int32 attention = 7; - - // - int32 labelStyle = 8; -} - -// -message StandardCard{ - // - string title = 1; - - // - string buttonTitle = 2; - - // - string buttonSelectedTitle = 3; - - // - bool showSelected = 4; -} - -// -message TFPanelCustomized{ - // - string rightBtnImg = 1; - - // - string rightBtnText = 2; - - // - string rightBtnTextColor = 3; - - // - string rightBtnLink = 4; - - // - string mainLabel = 5; - - // - string operator = 6; - - // - map entry = 7; -} - -//TAG图标信息 -message TIcon { - //TAG图标url - string icon = 1; -} - -// -message Tab{ - // - string background = 1; - - // - TabOtype otype = 2; - - // - int64 oid = 3; - - // - string uri = 4; - - // - TabStyle style = 5; - - // - string text = 6; - - // - string textColor = 7; - - // - string textColorSelected = 8; - - // - string pic = 9; - - // - int64 id = 10; -} - -// -enum TabOtype{ - // - UnknownOtype = 0; - - // - URL = 1; - - // - TopicNA = 2; -} - -// -enum TabStyle{ - // - UnknownStyle = 0; - - // - Text = 1; - - // - Pic = 2; -} - -//TAG信息 -message Tag { - //TAD id - int64 id = 1; - - //TAG名 - string name = 2; - - // - int64 likes = 3; - - // - int64 hates = 4; - - // - int32 liked = 5; - - // - int32 hated = 6; - - //TAG页面uri - string uri = 7; - - //TAG类型 - //common:普通 new:话题 act:活动 - string tagType = 8; -} - -//ugc视频合集信息 -message UgcSeason { - //合集id - int64 id = 1; - - //合集标题 - string title = 2; - - //合集封面url - string cover = 3; - - //合集简介 - string intro = 4; - - //分段列表 - repeated Section sections = 5; - - //合集状态数 - UgcSeasonStat stat = 6; - - // - string labelText = 7; - - // - string labelTextColor = 8; - - // - string labelBgColor = 9; - - // - string labelBgNightColor = 11; - - // - string labelTextNightColor = 10; - - //按钮文案 - string descRight = 12; - - //分集总数 - int64 epCount = 13; -} - -//ugc视频合集状态数 -message UgcSeasonStat{ - //合集id - int64 seasonId = 1; - - //总计观看 - int32 view = 2; - - //总计弹幕 - int32 danmaku = 3; - - //总计评论 - int32 reply = 4; - - //总计收藏 - int32 fav = 5; - - //总计投币 - int32 coin = 6; - - //总计分享 - int32 share = 7; - - // - int32 nowRank = 8; - - // - int32 hisRank = 9; - - //总计点赞 - int32 like = 10; -} - -// -message UpAct{ - // - int64 sid = 1; - - // - int64 mid = 2; - - // - string title = 3; - - // - string statement = 4; - - // - string image = 5; - - // - string url = 6; - - // - string button = 7; -} - -// -message UserGarb{ - // - string urlImageAniCut = 1; -} - -//用户追番标志 -message UserSeason{ - //关注状态 - //0:未关注 1:已关注 - string attention = 1; -} - -// -message VideoGuide{ - //关注按钮卡片 - repeated Attention attention = 1; - - //互动弹幕 - repeated CommandDm commandDms = 2; - - // - repeated OperationCard operationCard = 3; - - //内嵌操作按钮卡片 - repeated OperationCardNew operationCardNew = 4; - - // - ContractCard contractCard = 5; -} - -//分P明细 -message ViewPage{ - //分P视频基本信息 - bilibili.app.archive.v1.Page page = 1; - - //分P对应的音频稿件 - Audio audio = 2; - - //分P弹幕信息 - DM dm =3; - - //下载文案 - string downloadTitle = 4; - - //分P完整标题(视频标题+分P标题) - string downloadSubtitle = 5; -} - -//会员信息 -message Vip{ - //会员类型 - int32 type = 1; - - //到期时间 - int64 dueDate = 2; - - // - string dueRemark = 3; - - // - int32 accessStatus = 4; - - //会员状态 - int32 vipStatus = 5; - - // - string vipStatusWarn = 6; - - // - int32 themeType = 7; - - // - VipLabel label = 8; -} - -//会员类型标签 -message VipLabel{ - // - string path = 1; -} - -// -message subTFPanel{ - // - string rightBtnImg = 1; - - // - string rightBtnText = 2; - - // - string rightBtnTextColor = 3; - - // - string rightBtnLink = 4; - - // - string mainLabel = 5; - - // - string operator = 6; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/view/v1/view.proto b/grpc_api/bilibili/app/view/v1/view.proto new file mode 100644 index 0000000000..e32674eeba --- /dev/null +++ b/grpc_api/bilibili/app/view/v1/view.proto @@ -0,0 +1,1454 @@ +syntax = "proto3"; +package bilibili.app.view.v1; + +import "google/protobuf/any.proto"; +import "bilibili/app/archive/middleware/v1/preload.proto"; +import "bilibili/app/archive/v1/archive.proto"; + +service View { + // 视频页详情页 + rpc View (ViewReq) returns (ViewReply); + // 视频播放过程中的数据 + rpc ViewProgress (ViewProgressReq) returns (ViewProgressReply); + // 短视频下载 + rpc ShortFormVideoDownload (ShortFormVideoDownloadReq) returns (ShortFormVideoDownloadReply); + // 点击播放器卡片事件 + rpc ClickPlayerCard (ClickPlayerCardReq) returns (NoReply); + // 点击大型活动页预约 + rpc ClickActivitySeason (ClickActivitySeasonReq) returns (NoReply); + // 合集详情页 + rpc Season (SeasonReq) returns (SeasonReply); + // 播放器卡片曝光 + rpc ExposePlayerCard (ExposePlayerCardReq) returns (NoReply); + // 点击签订契约 + rpc AddContract (AddContractReq) returns (NoReply); +} + +// 空回复 +message NoReply {} + +// 视频页详情页-请求 +message ViewReq { + // 稿件avid(av/bv任选其一) + int64 aid = 1; + // 稿件bvid(av/bv任选其一) + string bvid = 2; + // 来源 + string from = 3; + // AI trackid + string trackid = 4; + // 广告扩展数据 + string adExtra = 5; + // 清晰度(旧版) + int32 qn = 6; + // 流版本(旧版) + int32 fnver = 7; + // 流类型(旧版) + int32 fnval = 8; + // 是否强制使用域名(旧版) + int32 forceHost = 9; + // 是否允许4K(旧版) + int32 fourk = 10; + // 当前页面spm + string spmid = 11; + // 上一页面spm + string fromSpmid = 12; + // + int32 autoplay = 13; + // 视频秒开参数 + bilibili.app.archive.middleware.v1.PlayerArgs playerArgs = 14; +} + +// 视频页信息-响应 +message ViewReply { + // 稿件信息 + bilibili.app.archive.v1.Arc arc = 1; + // 分P信息 + repeated ViewPage pages = 2; + // UP主扩展信息 ("OnwerExt"为源码中拼写错误) + OnwerExt ownerExt = 3; + // 稿件用户操作状态 + ReqUser reqUser = 4; + // 稿件TAG + repeated Tag tag = 5; + // TAG对应的图标 + map tIcon = 6; + // 稿件映射的PGC剧集信息 + Season season = 7; + // 充电排行 + ElecRank elecRank = 8; + // 历史观看进度 + History history = 9; + // 视频相关推荐列表 + repeated Relate relates = 10; + // 不感兴趣原因 + Dislike dislike = 11; + // 播放图标动画配置档 + PlayerIcon playerIcon = 12; + // + string vipActive = 13; + // 稿件bvid + string bvid = 14; + // 获得荣誉信息 + Honor honor = 15; + // 相关推荐顶部tab + repeated RelateTab relateTab = 16; + // 参与的活动页面url + string activityUrl = 17; + // 稿件引用bgm列表 + repeated Bgm bgm = 18; + // 联合投稿成员列表 + repeated Staff staff = 19; + // 争议信息 + string argueMsg = 20; + // 短链接 + string shortLink = 21; + // 播放实验 + // 1:相关推荐自动播放 + int32 playParam = 22; + // 标签 + Label label = 23; + // UGC视频合集信息 + UgcSeason ugcSeason = 24; + // 配置信息 + Config config = 25; + // 分享副标题(已观看xxx次) + string shareSubtitle = 26; + // 互动视频信息 + Interaction interaction = 27; + // 错误码 + // DEFAULT:正常 CODE404:视频被UP主删除 + ECode ecode = 28; + // 404页信息 + CustomConfig customConfig = 29; + // 广告 + repeated CM cms = 30; + // 广告配置 + CMConfig cmConfig = 31; + // 播放页定制tab + Tab tab = 32; + // 排行榜 + Rank rank = 33; + // 免流面板定制 + TFPanelCustomized tfPanelCustomized = 34; + // UP主发起活动 + UpAct upAct = 35; + // 用户装扮 + UserGarb userGarb = 36; + // 大型活动合集 + ActivitySeason activitySeason = 37; + // 评论样式 + string badge_url = 38; + // 直播预约信息 + LiveOrderInfo live_order_info = 39; + // 稿件简介v2 + repeated DescV2 desc_v2 = 40; +} + +// 直播预约信息 +message LiveOrderInfo { + // 预约id + int64 sid = 1; + // 预约条文案 + string text = 2; + // 直播开始时间 + int64 live_plan_start_time = 3; + // 是否预约 + bool is_follow = 4; +} + +// 大型活动合集 +message ActivitySeason { + // 稿件信息 + bilibili.app.archive.v1.Arc arc = 1; + // 分P信息 + repeated ViewPage pages = 2; + //("OnwerExt"为源码中拼写错误) + OnwerExt ownerExt = 3; + // 稿件用户操作状态 + ReqUser reqUser = 4; + // 充电排行 + ElecRank elecRank = 5; + // 历史观看进度 + History history = 6; + // 稿件bvid + string bvid = 7; + // 获得荣誉信息 + Honor honor = 8; + // 联合投稿成员列表 + repeated Staff staff = 9; + // UGC视频合集信息 + UgcSeason ugcSeason = 10; + // 播放页定制tab + Tab tab = 11; + // 排行榜 + Rank rank = 12; + // 预约模块 + Order order = 13; + // 是否支持点踩 + bool supportDislike = 14; + // 相关推荐(运营配置+AI推荐) + OperationRelate operationRelate = 15; + // 活动页资源包 + ActivityResource activityResource = 16; + // 短链接 + string shortLink = 17; + // 标签 + Label label = 18; + // 不感兴趣原因 + Dislike dislike = 19; + // 播放图标动画配置档 + PlayerIcon playerIcon = 20; + // 分享副标题(已观看xxx次) + string shareSubtitle = 21; + // 广告配置 + CMConfig cmConfig = 22; + // 免流面板定制 + TFPanelCustomized tfPanelCustomized = 23; + // 争议信息 + string argueMsg = 24; + // 错误码 + // DEFAULT:正常 CODE404:视频被UP主删除 + ECode ecode = 25; + // 404页信息 + CustomConfig customConfig = 26; + // 评论样式 + string badge_url = 27; + // 稿件简介v2 + repeated DescV2 desc_v2 = 28; +} + +// 特殊稿件简介 +message DescV2 { + // 文本内容 + string text = 1; + // 文本类型 + DescType type = 2; + // 点击跳转链接 + string uri = 3; + // 资源ID + int64 rid = 4; +} + +// 枚举-文本类型 +enum DescType { + // 占位 + DescTypeUnknown = 0; + // 文本 + DescTypeText = 1; + // @ + DescTypeAt = 2; +} + +// 活动页资源包 +message ActivityResource { + // mod资源池名称 + string modPoolName = 1; + // mod资源名称 + string modResourceName = 2; + // 背景色 + string bgColor = 3; + // 选中背景色 + string selectedBgColor = 4; + // 文字颜色 + string textColor = 5; + // 浅字色 + string lightTextColor = 6; + // 深字色 + string darkTextColor = 7; + // 分割线色 + string dividerColor = 8; +} + +// 相关推荐(运营配置+AI推荐) +message OperationRelate { + // 模块标题 + string title = 1; + // 相关推荐模块内容 + repeated RelateItem relateItem = 2; + // AI相关推荐 + repeated Relate ai_relate_item = 3; +} + +// 相关推荐内容 +message RelateItem { + // 跳链 + string url = 1; + // 封面 + string cover = 2; +} + +// 预约模块 +message Order { + // 用户操作态 + bool status = 1; + // 模块标题 + string title = 2; + // 按钮文字 未操作 + string buttonTitle = 3; + // 按钮文字 已操作 + string buttonSelectedTitle = 4; + // 合集播放数 + int64 seasonStatView = 5; + // 合集弹幕数 + int64 seasonStatDanmaku = 6; + // 预约类型(点击时透传,直播开始前预约活动,直播开始后收藏合集) + BizType orderType = 7; + // 预约业务参数 + oneof orderParamCase { + // 预约活动参数 + BizReserveActivityParam bizReserveActivityParam = 8; + // 收藏合集参数 + BizFavSeasonParam bizFavSeasonParam = 9; + } + // 合集简介 + string intro = 10; +} + +// 业务类型 +enum BizType { + BizTypeNone = 0; + // 追番追剧 + BizTypeFollowVideo = 1; + // 预约活动 + BizTypeReserveActivity = 2; + // 跳转链接 + BizTypeJumpLink = 3; + // 收藏合集 + BizTypeFavSeason = 4; + // 预约游戏 + BizTypeReserveGame = 5; +} + +// 用户装扮信息 +message UserGarb { + // 点赞动画url + string urlImageAniCut = 1; +} + +// 排行榜 +message Rank { + // 排行榜icon + string icon = 1; + // 排行榜icon 夜间模式 + string iconNight = 2; + // 排行榜文案 + string text = 3; +} + +// TAB +message Tab { + // 背景图片 + string background = 1; + // 跳转类型 + TabOtype otype = 2; + // 类型id + int64 oid = 3; + // 跳转url + string uri = 4; + // 样式 + TabStyle style = 5; + // 文字 + string text = 6; + // 未选中态字色 + string textColor = 7; + // 选中态字色 + string textColorSelected = 8; + // 图片 + string pic = 9; + // 后台配置自增 + int64 id = 10; +} + +// TAB样式 +enum TabStyle { + // 未知样式 + UnknownStyle = 0; + // 文字样式 + Text = 1; + // 图片样式 + Pic = 2; +} + +// TAB跳转类型 +enum TabOtype { + // 未知类型 + UnknownOtype = 0; + // url链接 + URL = 1; + // native话题活动 + TopicNA = 2; +} + +// 错误代码 +enum ECode { + //正常 + DEFAULT = 0; + // 稿件被UP主删除 + CODE404 = 1; +} + +// 分P信息 +message ViewPage { + // 分P基本信息 + bilibili.app.archive.v1.Page page = 1; + // 分P对应的音频稿件 + Audio audio = 2; + // 分P弹幕信息 + DM dm =3; + // 下载文案 + string downloadTitle = 4; + // 分P完整标题(视频标题+分P标题) + string downloadSubtitle = 5; +} + +// 音频稿件信息 +message Audio { + // 音频标题 + string title = 1; + // 音频封面url + string coverUrl = 2; + // 音频auid + int64 songId = 3; + // 音频播放量 + int64 playCount = 4; + // 音频评论数 + int64 replyCount = 5; + // 音频作者UID + int64 upperId = 6; + // 进入按钮文案 + string entrance = 7; + // + int64 songAttr = 8; +} + +// 分P弹幕信息 +message DM { + // 分P是否关闭弹幕 + // 0:正常 1:关闭 + bool closed = 1; + // + bool realName = 2; + // 分P弹幕总数 + int64 count = 3; +} + +// UP主扩展信息 ("OnwerExt"为源码中拼写错误) +message OnwerExt { + // 认证信息 + OfficialVerify officialVerify = 1; + // 直播信息 + Live live = 2; + // 会员信息 + Vip vip = 3; + // + repeated int64 assists = 4; + // 粉丝数 + int64 fans = 5; + // 总投稿数 + string arcCount = 6; +} + +// 认证信息 +message OfficialVerify { + // 认证类型 + // 0:个人认证 1:官方认证 + int32 type = 1; + //认证名称 + string desc = 2; +} + +// 直播信息 +message Live { + // 主播UID + int64 mid = 1; + // 直播间id + int64 roomid = 2; + // 直播间url + string uri = 3; + // + string endpageUri = 4; +} + +// 会员信息 +message Vip { + //会员类型 + int32 type = 1; + //到期时间 + int64 dueDate = 2; + // + string dueRemark = 3; + // + int32 accessStatus = 4; + //会员状态 + int32 vipStatus = 5; + // + string vipStatusWarn = 6; + // + int32 themeType = 7; + // + VipLabel label = 8; +} + +// 会员类型标签 +message VipLabel { + // + string path = 1; + // + string text = 2; + // + string label_theme = 3; +} + +// 用户操作状态 +message ReqUser { + // 用户是否关注UP + int32 attention = 1; + // UP是否关注用户 + int32 guestAttention = 2; + // 是否收藏 + int32 favorite = 3; + // 是否点赞 + int32 like = 4; + // 是否点踩 + int32 dislike = 5; + // 是否投币 + int32 coin = 6; + // 关注等级 + int32 attentionLevel = 7; + // 是否收藏合集 + int32 favSeason = 8; +} + +// TAG信息 +message Tag { + // TAD id + int64 id = 1; + // TAG名 + string name = 2; + // + int64 likes = 3; + // + int64 hates = 4; + // + int32 liked = 5; + // + int32 hated = 6; + // TAG页面uri + string uri = 7; + // TAG类型 + // common:普通 new:话题 act:活动 + string tagType = 8; +} + +// TAG图标信息 +message TIcon { + // TAG图标url + string icon = 1; +} + +// 剧集信息 +message Season { + // + string allowDownload = 1; + // 剧集ssid + int64 seasonId = 2; + // 是否重定向跳转 + int32 isJump = 3; + // 剧集标题 + string title = 4; + // 剧集封面url + string cover = 5; + // 剧集是否完结 + int32 isFinish = 6; + // 最新一话epid + int64 newestEpId = 7; + // 最新一话标题 + string newestEpIndex = 8; + // 总集数 + int64 totalCount = 9; + // 更新星期日 + int32 weekday = 10; + // 用户追番标志 + UserSeason userSeason = 11; + // + SeasonPlayer player = 12; + // 单集页面url + string ogv_playurl = 13; +} + +// 用户追番标志 +message UserSeason { + // 关注状态 + // 0:未关注 1:已关注 + string attention = 1; +} + +// +message SeasonPlayer{ + // + int64 aid = 1; + // + string vid = 2; + // + int64 cid = 3; + // + string from = 4; +} + +// 充电排行信息 +message ElecRank { + // 充电排行列表 + repeated ElecRankItem list = 1; + // 充电用户数 + int64 count = 2; +} + +// 充电用户信息 +message ElecRankItem { + // 用户头像url + string avatar = 1; + // 用户昵称 + string nickname = 2; + // 充电留言 + string message = 3; + // 用户mid + int64 mid = 4; +} + +// 稿件观看进度 +message History { + // 播放进度分P cid + int64 cid = 1; + // 播放进度时间 + // 0:未观看 -1:已看完 正整数:播放时间进度 + int64 progress = 2; +} + +//相关推荐项 +message Relate { + // + int64 aid = 1; + // 封面url + string pic = 2; + // 标题 + string title = 3; + // UP主信息 + bilibili.app.archive.v1.Author author = 4; + // 稿件状态数 + bilibili.app.archive.v1.Stat stat = 5; + // 时长 + int64 duration = 6; + // 跳转类型 + // special:pgc视频 av:稿件视频 cm:广告 game:游戏 + string goto = 7; + // 参数(如av号等) + string param = 8; + // 跳转uri + string uri = 9; + // + string jumpUrl = 10; + // 评分 + double rating = 11; + // + string reserve = 12; + // 来源标识 + // operation:管理员添加 + string from = 13; + // 备注 + string desc = 14; + // + string rcmdReason = 15; + // 标志文字 + string badge = 16; + // 1P cid + int64 cid = 17; + // + int32 seasonType = 18; + // + int32 ratingCount = 19; + // 标签文案 + string tagName = 20; + // 游戏礼包信息 + PackInfo packInfo = 21; + // + Notice notice = 22; + // 按钮信息 + Button button = 23; + // spm追踪id + string trackid = 24; + // 游戏卡片新样式 + int32 newCard = 25; + // 推荐理由样式 + ReasonStyle rcmdReasonStyle = 26; + // + string coverGif = 27; + // 广告 + CM cm = 28; + // 游戏卡字段 + // 0:下载 1:预约(跳过详情) 2:预约 3:测试 4:测试+预约 5:跳过详情页 + int64 reserveStatus = 29; +} + +// 推荐理由样式 +message ReasonStyle { + // + string text = 1; + // 日间模式文字 + string textColor = 2; + // + string bgColor = 3; + // + string borderColor = 4; + // 夜间模式文字 + string textColorNight = 5; + // + string bgColorNight = 6; + // + string borderColorNight = 7; + // 1:填充 2:描边 3:填充 + 描边 4:背景不填充 + 背景不描边 + int32 bgStyle = 8; + // + int32 selected = 9; +} + +//游戏礼包信息 +message PackInfo { + // 礼包标题 + string title = 1; + // 礼包页uri + string uri = 2; +} + +// +message Notice { + // + string title = 1; + // + string desc = 2; +} + +// +message Button { + // 按钮文案 + string title = 1; + // 跳转uri + string uri = 2; +} + +// 不喜欢原因 +message Dislike { + // 标题 + string title = 1; + // + string subtitle = 2; + // 原因项列表 + repeated DislikeReasons reasons = 3; +} + +// 不喜欢原因项 +message DislikeReasons { + // 类型 + // 1:全部类型 3:TAG 4:UP主 + int64 id = 1; + // 相关UP主mid + int64 mid = 2; + // 相关分区tid + int32 rid = 3; + // 相关TAG id + int64 tagId = 4; + // 相关名称 + string name = 5; +} + +// 进度条动画配置 +message PlayerIcon { + // 拖动动画配置档url + string url1 = 1; + // 拖动动画配置档hash + string hash1 = 2; + // 松手动画配置档url + string url2 = 3; + // 松手动画配置档hash + string hash2 = 4; +} + +// 广告 +message CM { + // 广告数据(需要二次解包) + google.protobuf.Any sourceContent = 1; +} + +// +message AdInfo { + // + int64 creative_id = 1; + // + int64 creative_type = 2; + // + CreativeContent creative_content = 3; + // + string ad_cb = 4; + // + int32 card_type = 5; + // + bytes Extra = 6; +} + +// +message CreativeContent { + // + string title = 1; + // + string description = 2; + // + string button_title = 3; + // + int64 video_id = 4; + // + string username = 5; + // + string image_url = 6; + // + string image_md5 = 7; + // + string log_url = 8; + // + string log_md5 = 9; + // + string url = 10; + // + string click_url = 11; + // + string show_url = 12; +} + +// 广告配置 +message CMConfig { + // 广告配置数据(需要二次解包) + google.protobuf.Any adsControl = 1; +} + +// +message Asset { + // + int32 paid = 1; + // + int64 price = 2; + // + AssetMsg msg = 3; + // + AssetMsg preview_msg = 4; +} + +// +message AssetMsg { + // + string desc1 = 1; + // + string desc2 = 2; +} + +// 视频引用的bgm音频 +message Bgm { + // 音频auid + int64 sid = 1; + // 音频作者mid + int64 mid = 2; + // 音频标题 + string title = 3; + // 音频作者昵称 + string author = 4; + // bgm页面url + string jumpUrl = 5; + // 音频封面url + string cover = 6; +} + +// 合作成员信息 +message Staff { + // 成员mid + int64 mid = 1; + // 成员角色 + string title = 2; + // 成员头像url + string face = 3; + // 成员昵称 + string name = 4; + // 成员官方信息 + OfficialVerify officialVerify = 5; + // 成员会员信息 + Vip vip = 6; + // 是否关注该成员 + int32 attention = 7; + // + int32 labelStyle = 8; +} + +// +message Label { + // + int32 type = 1; + // + string uri = 2; +} + +// +enum SeasonType { + // + Unknown = 0; + // + Base = 1; + // + Good = 2; +} + +// UGC视频合集信息 +message UgcSeason { + // 合集id + int64 id = 1; + // 合集标题 + string title = 2; + // 合集封面url + string cover = 3; + // 合集简介 + string intro = 4; + // 小节列表 + repeated Section sections = 5; + // 合集状态数 + UgcSeasonStat stat = 6; + // + string labelText = 7; + // + string labelTextColor = 8; + // + string labelBgColor = 9; + // + string labelBgNightColor = 11; + // + string labelTextNightColor = 10; + // 按钮文案 + string descRight = 12; + // 分集总数 + int64 epCount = 13; +} + +//ugc视频合集状态数 +message UgcSeasonStat { + // 合集id + int64 seasonId = 1; + // 观看数 + int32 view = 2; + // 弹幕数 + int32 danmaku = 3; + // 评论数 + int32 reply = 4; + // 收藏数 + int32 fav = 5; + // 投币数 + int32 coin = 6; + // 分享数 + int32 share = 7; + // 当前排名 + int32 nowRank = 8; + // 历史最高排名 + int32 hisRank = 9; + // 总计点赞 + int32 like = 10; +} + +// 视频合集小节信息 +message Section { + // 小节id + int64 id = 1; + // 小节标题 + string title = 2; + // 小节类型 + // 0:其他 1:正片 + int64 type = 3; + // 单话列表 + repeated Episode episodes = 4; +} + +//视频合集单话信息 +message Episode { + // 合集单话id + int64 id = 1; + // 稿件avid + int64 aid = 2; + // 视频1P cid + int64 cid = 3; + // 稿件标题 + string title = 4; + // 稿件封面url + string cover = 5; + // 投稿时间显示文案 + string coverRightText = 6; + // 视频分P信息 + bilibili.app.archive.v1.Page page = 7; + // 视频状态数 + bilibili.app.archive.v1.Stat stat = 8; + // 稿件bvid + string bvid = 9; + // 稿件UP主信息 + bilibili.app.archive.v1.Author author = 10; +} + +// +message Config { + // 下方推荐项标题 + string relatesTitle = 1; + // + int32 relatesStyle = 2; + // + int32 relateGifExp = 3; + // + int32 endPageHalf = 4; + // + int32 endPageFull = 5; + // 退出是否自动小窗 + bool autoSwindow = 6; +} + +// +message Interaction { + // + Node historyNode = 1; + // + int64 graphVersion = 2; + // + string msg = 3; + // + string evaluation = 4; + // + int64 mark = 5; +} + +// 稿件获得荣誉信息 +message Honor { + // 荣誉栏图标url + string icon = 1; + // 荣誉栏图标url 夜间模式 + string iconNight = 2; + // 荣誉文案 + string text = 3; + // 荣誉副文案 + string textExtra = 4; + // 标题颜色 + string textColor = 5; + // 标题颜色 夜间模式 + string textColorNight = 6; + // 背景颜色 + string bgColor = 7; + // 背景颜色 夜间模式 + string bgColorNight = 8; + // 跳转uri + string url = 9; + // 跳转角标文案 + string urlText = 10; +} + +// +message RelateTab { + // + string id = 1; + // + string title = 2; +} + +// +message UpAct { + // + int64 sid = 1; + // + int64 mid = 2; + // + string title = 3; + // + string statement = 4; + // + string image = 5; + // + string url = 6; + // + string button = 7; +} + +// +message Node { + // + int64 nodeId = 1; + // + string title = 2; + // + int64 cid = 3; +} + +// 稿件播放中数据-请求 +message ViewProgressReq{ + // 稿件avid + int64 aid = 1; + // 视频cid + int64 cid = 2; + // UP主mid + int64 upMid = 3; +} + +// 稿件播放中数据-回复 +message ViewProgressReply{ + // 视频引导信息 + VideoGuide videoGuide = 1; + // Chronos灰度管理 + Chronos chronos = 2; +} + +// Chronos灰度管理 +message Chronos { + // 资源包md5 + string md5 = 1; + // 资源包 + string file = 2; +} + +// 视频引导信息 +message VideoGuide{ + // 关注按钮卡片 + repeated Attention attention = 1; + // 互动弹幕 + repeated CommandDm commandDms = 2; + // 运营卡片 + repeated OperationCard operationCard = 3; + // 运营卡片新版 + repeated OperationCardNew operationCardNew = 4; + // 契约卡 + ContractCard contractCard = 5; +} + +// 契约卡 +message ContractCard { + // 需要触发的播放进度百分比 + float displayProgress = 1; + // 触发位置的前后误差(单位ms) + int64 displayAccuracy = 2; + // 展示持续时间(单位ms) + int64 displayDuration = 3; + // 弹出模式 + // 0: 原有模式 1: 半屏弹出 2: 全屏、半屏均弹出 + int32 show_mode = 4; + // 提示页面 + // 0: 原有页面 1: 6.23版本新页面 + int32 page_type = 5; + // UP主信息 + UpperInfos upper = 6; +} + +// UP主信息 +message UpperInfos { + // 粉丝数 + int64 fans_count = 1; + // 近半年投稿数 + int64 arc_count_last_half_year = 2; + // 成为UP主时间 + int64 first_up_dates = 3; + // 总播放量 + int64 total_play_count = 4; +} + +//内嵌操作按钮卡片 +message OperationCardNew { + // 卡片id + int64 id = 1; + // 开始时间 + int32 from = 2; + // 结束时间 + int32 to = 3; + // 用户操作态 + // true已操作 false未操作 + bool status = 4; + // 卡片类型 + OperationCardType cardType = 5; + // 卡片渲染 + oneof renderCase { + // 标准卡 + StandardCard standardCard= 6; + // 老运营卡片(原B剪跳转卡) + OperationCard operationCard = 7; + } + // + BizType bizType = 8; + // + oneof paramCase { + // 追番追剧参数 + BizFollowVideoParam FollowVideoParam = 9; + // 预约活动参数 + BizReserveActivityParam ReserveActivityParam = 10; + // 跳转参数 + BizJumpLinkParam LinkParam = 11; + // 预约游戏参数 + BizReserveGameParam game = 12; + } +} + +// 卡片样式 +enum OperationCardType { + // + CardTypeNone = 0; + // 标准卡 + CardTypeStandard = 1; + // 原跳转卡 + CardTypeSkip = 2; +} + +// 标准卡 +message StandardCard{ + // 卡片文案 + string title = 1; + // 按钮文字 未操作 + string buttonTitle = 2; + // 按钮文字 已操作 + string buttonSelectedTitle = 3; + // 已操作态是否显示 + bool showSelected = 4; +} + +// 老运营卡片 +message OperationCard{ + // 开始时间(单位为秒) + int32 startTime = 1; + // 结束时间(单位为秒) + int32 endTime = 2; + // 图标 + string icon = 3; + // 标题 + string title = 4; + // 按钮文案 + string buttonText = 5; + // 跳转链接 + string url = 6; + // 内容描述 + string content = 7; +} + +// 互动弹幕条目信息 +message CommandDm{ + // 弹幕id + int64 id = 1; + // 对象视频cid + int64 oid = 2; + // 发送者mid + string mid = 3; + // 互动弹幕指令 + string command = 4; + // 互动弹幕正文 + string content = 5; + // 出现时间 + int32 progress = 6; + // 创建时间 + string ctime = 7; + // 发布时间 + string mtime = 8; + // 扩展json数据 + string extra = 9; + // 弹幕id str类型 + string idStr = 10; +} + +// 关注按钮卡片 +message Attention { + // 开始时间 + int32 startTime = 1; + // 结束时间 + int32 endTime = 2; + // 位置x坐标 + double posX = 3; + // 位置y坐标 + double posY = 4; +} + +// 404页信息 +message CustomConfig { + // 重定向页面url + string redirectUrl = 1; +} + +// 免流面板定制 +message TFPanelCustomized { + // 右侧按钮素材 + string rightBtnImg = 1; + // 右侧按钮文案 + string rightBtnText = 2; + // 右侧按钮字体颜色 + string rightBtnTextColor = 3; + // 右侧按钮跳转链接 + string rightBtnLink = 4; + // 中心主文案内容 + string mainLabel = 5; + // 运营商(cm ct cu) + string operator = 6; + // 子面板定制化配置 + map entry = 7; +} + +// 免流子面板定制化配置 +message subTFPanel { + // 右侧按钮素材 + string rightBtnImg = 1; + // 右侧按钮文案 + string rightBtnText = 2; + // 右侧按钮字体颜色 + string rightBtnTextColor = 3; + // 右侧按钮跳转链接 + string rightBtnLink = 4; + // 中心主文案内容 + string mainLabel = 5; + // 运营商 + string operator = 6; +} + +// 短视频下载-请求 +message ShortFormVideoDownloadReq{ + // 稿件avid + int64 aid = 1; + // 视频cid + int64 cid = 2; + // 用户mid + int64 mid = 3; + // 设备buvid + string buvid = 4; + // 移动端包类型 + string mobiApp = 5; + // 移动端版本号 + int64 build = 6; + // 运行设备 + string device = 7; + // 平台 + string platform = 8; + // 当前页面spm + string spmid = 9; +} + +// 短视频下载-响应 +message ShortFormVideoDownloadReply { + // 是否有下载分享按钮 + bool hasDownloadUrl = 1; + // 下载url + string downloadUrl = 2; + // 文件md5 + string md5 = 3; + // 文件大小(单位为Byte) + int64 size = 4; +} + +// 点击播放器卡片-请求 +message ClickPlayerCardReq { + // 卡片id + int64 id = 1; + // 稿件avid + int64 aid = 2; + // 视频cid + int64 cid = 3; + //操作 + //0:操作 1:取消操作 + int64 action = 4; + // 当前页面spm + string spmid = 5; +} + +// 点击大型活动页预约-请求 +message ClickActivitySeasonReq { + // 预约类型 + BizType orderType = 1; + // 当前页面spm + string spmid = 2; + // 业务参数 + oneof orderParamCase { + // 预约活动参数 + BizReserveActivityParam bizReserveActivityParam = 3; + // 收藏合集参数 + BizFavSeasonParam bizFavSeasonParam = 4; + } + // 操作 + //0:操作 1:取消操作 + int64 action = 5; +} + +// +message BizFollowVideoParam { + // + int64 seasonId = 1; +} + +// 预约活动参数 +message BizReserveActivityParam{ + // 活动id + int64 activityId = 1; + // 场景 + string from = 2; + // 类型 + string type = 3; + // 资源id + int64 oid = 4; +} + +// +message BizJumpLinkParam { + // 链接 + string url = 1; +} + +message BizReserveGameParam { + // 游戏id + int64 game_id = 1; +} + +// 收藏合集参数 +message BizFavSeasonParam { + // 合集id + int64 seasonId = 1; +} + +// 合集详情页-请求 +message SeasonReq { + // 合集id + int64 seasonId = 1; +} + +// 合集详情页-响应 +message SeasonReply { + // 合集信息 + UgcSeason season = 1; +} + +// 播放器卡片曝光-请求 +message ExposePlayerCardReq { + // 卡片类型 + PlayerCardType cardType = 1; + // 稿件avid + int64 aid = 2; + // 视频cid + int64 cid = 3; + // 当前页面spm + string spmid = 4; +} + +// 卡片类型 +enum PlayerCardType { + // + PlayerCardTypeNone_VALUE = 0; + // 关注卡 + PlayerCardTypeAttention_VALUE = 1; + // 运营卡 + PlayerCardTypeOperation_VALUE = 2; + // 契约卡 + PlayerCardTypeContract_VALUE = 3; +} + +// 点击签订契约-请求 +message AddContractReq { + // 稿件avid + int64 aid = 1; + // UP主mid + int64 upMid = 2; + // 当前页面spm + string spmid = 3; +} diff --git a/grpc_api/bilibili/app/wall/v1.proto b/grpc_api/bilibili/app/wall/v1.proto deleted file mode 100644 index c82e6990e6..0000000000 --- a/grpc_api/bilibili/app/wall/v1.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; - -package bilibili.app.wall.v1; - -// -service Wall { - // - // - rpc ruleInfo (RuleRequest) returns (RulesReply); -} - -//-请求 -message RuleRequest { - -} - -//-回复 -message RulesReply { - // - map rulesInfo = 1; -} - -// -message RuleInfo { - // - bool tf = 1; - - // - string m = 2; - - // - string a = 3; - - // - string p = 4; -} - -// -message RulesInfo { - // - repeated RuleInfo rulesInfo = 1; -} \ No newline at end of file diff --git a/grpc_api/bilibili/app/wall/v1/wall.proto b/grpc_api/bilibili/app/wall/v1/wall.proto new file mode 100644 index 0000000000..23e158f021 --- /dev/null +++ b/grpc_api/bilibili/app/wall/v1/wall.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package bilibili.app.wall.v1; + +// 免流规则 +service Wall { + // 获取免流规则信息 + rpc RuleInfo (RuleRequest) returns (RulesReply); +} + +// 获取免流规则信息-请求 +message RuleRequest {} + +// 获取免流规则信息-响应 +message RulesReply { + // 各ISP的免流规则信息组 + // ISP如: cu ct cm + map rulesInfo = 1; +} + +// 免流规则信息 +message RuleInfo { + // 是否支持免流 + bool tf = 1; + // 操作模式 + // break:无 replace:替换 proxy:代理 + string m = 2; + // 操作参数 + string a = 3; + // 匹配目标正则 + string p = 4; +} + +// 免流规则信息组 +message RulesInfo { + // 免流规则信息 + repeated RuleInfo rulesInfo = 1; +} \ No newline at end of file diff --git a/grpc_api/bilibili/metadata.proto b/grpc_api/bilibili/metadata.proto deleted file mode 100644 index 2c2dba5260..0000000000 --- a/grpc_api/bilibili/metadata.proto +++ /dev/null @@ -1,184 +0,0 @@ -syntax = "proto3"; - -package bilibili.metadata; - -/**********环境参数1**********/ -//x-bili-device-bin -message Device{ - //产品id - int32 appId = 1; - - //构建id - int32 build = 2; - - //设备buvid - string buvid = 3; - - //包类型 - string mobiApp = 4; - - //平台类型 - string platform = 5; - - //设备类型 - string device = 6; - - //渠道 - string channel = 7; - - //品牌 - string brand = 8; - - //型号 - string model = 9; - - //系统版本 - string osver = 10; - - // - string fpLocal = 11; - - // - string fpRemote = 12; - - //APP版本号 - string versionName = 13; -} - -/**********环境参数2**********/ -//x-bili-metadata-bin -message Metadata{ - //登录Token - string accessKey = 1; - - //包类型 - string mobiApp = 2; - - //设备类型 - string device = 3; - - //构建id - int32 build = 4; - - //渠道 - string channel = 5; - - //设备buvid - string buvid = 6; - - //平台类型 - string platform = 7; -} - -/**********区域标识**********/ -//x-bili-locale-bin -message Locale { - //App设置的locale - LocaleIds c_locale = 1; - - //系统默认的locale - LocaleIds s_locale = 2; - - //sim卡的国家码+运营商码 - string sim_code = 3; - - //时区 - string timezone = 4; -} - -// -message LocaleIds{ - // - string language = 1; - - // - string script = 2; - - // - string region = 3; -} - -/**********网络类型标识**********/ -//x-bili-network-bin -message Network{ - //网络类型 - Type type = 1; - - //免流类型 - TFType tf = 2; - - //运营商 - string oid = 3; -} - -//网络类型 -enum Type{ - //未知 - NT_UNKNOWN = 0; - - //wifi - WIFI = 1; - - //蜂窝网络 - CELLULAR = 2; - - //未连接 - OFFLINE = 3; - - //以太网 - ETHERNET = 5; - - //其他 - OTHERNET = 4; -} - -//免流类型 -enum TFType { - //正常计费 - TF_UNKNOWN = 0; - - //联通卡 - U_CARD = 1; - - //联通包 - U_PKG = 2; - - //移动卡 - C_CARD = 3; - - //移动包 - C_PKG = 4; - - //电信卡 - T_CARD = 5; - - //电信包 - T_PKG = 6; -} - -/**********限制条件**********/ -message Restriction { - //青少年模式开关状态 - bool teenagers_mode = 1; - - //课堂模式开关状态 - bool lessons_mode = 2; - - //模式类型 - ModeType mode = 3; - - //app审核review状态 - bool review = 4; -} - -//模式类型 -enum ModeType{ - //正常 - NORMAL = 0; - - //青少年模式 - TEENAGERS = 1; - - //课堂模式 - LESSONS = 2; -} \ No newline at end of file diff --git a/grpc_api/bilibili/metadata/device/device.proto b/grpc_api/bilibili/metadata/device/device.proto new file mode 100644 index 0000000000..45108e6cce --- /dev/null +++ b/grpc_api/bilibili/metadata/device/device.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +package bilibili.metadata.device; + +// 设备信息 +// gRPC头部:x-bili-device-bin +message Device { + // 产品id + // 粉 白 蓝 直播姬 HD 海外 OTT 漫画 TV野版 小视频 网易漫画 网易漫画 网易漫画HD 国际版 + // 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + int32 app_id = 1; + // 构建id + int32 build = 2; + // 设备buvid + string buvid = 3; + // 包类型 + string mobi_app = 4; + // 平台类型 + // ios android + string platform = 5; + // 设备类型 + string device = 6; + // 渠道 + string channel = 7; + // 手机品牌 + string brand = 8; + // 手机型号 + string model = 9; + // 系统版本 + string osver = 10; + // 本地设备指纹 + string fp_local = 11; + // 远程设备指纹 + string fp_remote = 12; + // APP版本号 + string version_name = 13; + // 设备指纹, 不区分本地或远程设备指纹,作为推送目标的索引 + string fp = 14; +} diff --git a/grpc_api/bilibili/metadata/fawkes/fawkes.proto b/grpc_api/bilibili/metadata/fawkes/fawkes.proto new file mode 100644 index 0000000000..8ce70901a8 --- /dev/null +++ b/grpc_api/bilibili/metadata/fawkes/fawkes.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package bilibili.metadata.fawkes; + +message FawkesReq { + // 客户端在fawkes系统的唯一名 + string appkey = 1; + // 客户端在fawkes系统中的环境参数 + string env = 2; + // 启动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 new file mode 100644 index 0000000000..8781278576 --- /dev/null +++ b/grpc_api/bilibili/metadata/locale/locale.proto @@ -0,0 +1,26 @@ +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 { + // App设置的locale + LocaleIds c_locale = 1; + // 系统默认的locale + LocaleIds s_locale = 2; + // sim卡的国家码+运营商码 + string sim_code = 3; + // 时区 + string timezone = 4; +} diff --git a/grpc_api/bilibili/metadata/metadata.proto b/grpc_api/bilibili/metadata/metadata.proto new file mode 100644 index 0000000000..dda7bcdb2c --- /dev/null +++ b/grpc_api/bilibili/metadata/metadata.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package bilibili.metadata; + +// 请求元数据 +// gRPC头部:x-bili-metadata-bin +message Metadata { + // 登录Token + string access_key = 1; + // 包类型 + string mobi_app = 2; + // 运行设备 + string device = 3; + // 构建id + int32 build = 4; + // 渠道 + string channel = 5; + // 设备buvid + string buvid = 6; + // 平台类型 + string platform = 7; +} diff --git a/grpc_api/bilibili/metadata/network/network.proto b/grpc_api/bilibili/metadata/network/network.proto new file mode 100644 index 0000000000..5282e9f5fc --- /dev/null +++ b/grpc_api/bilibili/metadata/network/network.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package bilibili.metadata.network; + +// 网络类型 +enum NetworkType { + NT_UNKNOWN = 0; // 未知 + WIFI = 1; // WIFI + CELLULAR = 2; // 移动网络 + OFFLINE = 3; // 未连接 + OTHERNET = 4; // 其他网络 + ETHERNET = 5; // 以太网 +} + +// 免流类型 +enum TFType { + TF_UNKNOWN = 0; // 正常计费 + U_CARD = 1; // 联通卡 + U_PKG = 2; // 联通包 + C_CARD = 3; // 移动卡 + C_PKG = 4; // 移动包 + 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/restriction/restriction.proto b/grpc_api/bilibili/metadata/restriction/restriction.proto new file mode 100644 index 0000000000..57ad552d11 --- /dev/null +++ b/grpc_api/bilibili/metadata/restriction/restriction.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package bilibili.metadata.restriction; + +// 模式类型 +enum ModeType { + NORMAL = 0; // 正常模式 + TEENAGERS = 1; // 青少年模式 + LESSONS = 2; // 课堂模式 +} + +// 限制条件 +message Restriction { + // 青少年模式开关状态 + bool teenagers_mode = 1; + // 课堂模式开关状态 + bool lessons_mode = 2; + // 模式类型(旧版) + ModeType mode = 3; + // app 审核review状态 + bool review = 4; +} diff --git a/grpc_api/bilibili/rpc.proto b/grpc_api/bilibili/rpc.proto deleted file mode 100644 index b073070a34..0000000000 --- a/grpc_api/bilibili/rpc.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package bilibili.rpc; - -import "google/protobuf/any.proto"; - -//接口回复报错信息 -//grpc-status-details-bin -message Status { - //业务错误码 - int32 code = 1; - - //业务错误信息 - string message = 2; - - //扩展信息嵌套(套娃专用) - repeated google.protobuf.Any details = 3; -} \ No newline at end of file diff --git a/grpc_api/bilibili/rpc/status.proto b/grpc_api/bilibili/rpc/status.proto new file mode 100644 index 0000000000..c120a1b08d --- /dev/null +++ b/grpc_api/bilibili/rpc/status.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package bilibili.rpc; + +import "google/protobuf/any.proto"; + +// 响应gRPC Status +// 当status code是[UNKNOWN = 2]时,details为业务详细的错误信息,进行proto any转换成业务码结构体 +message Status { + // 业务错误码 + int32 code = 1; + // 业务错误信息 + string message = 2; + //扩展信息嵌套(相当于该messasge的套娃) + repeated google.protobuf.Any details = 3; +} diff --git a/grpc_api/comp_proto.bat b/grpc_api/comp_proto.bat deleted file mode 100644 index 39eea43ae7..0000000000 --- a/grpc_api/comp_proto.bat +++ /dev/null @@ -1,10 +0,0 @@ -@ echo off -rem 递归编译proto -set lang="python" -set patch=%CD% -for /r %patch% %%a in (*.proto) do ( - protoc -I %patch% --%lang%_out=. %%~fa - echo comp %%~fa -) -echo all done -pause >nul \ No newline at end of file diff --git a/grpc_api/comp_proto.sh b/grpc_api/comp_proto.sh deleted file mode 100644 index 9ad092882d..0000000000 --- a/grpc_api/comp_proto.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# 递归编译proto -lang='python' -patch=$(cd $(dirname $0); pwd) -find $patch -name '*.proto' -exec protoc -I $patch --${lang}_out=. {} \; -exec echo comp {} \; -echo 'all Done' \ No newline at end of file