更新部分proto结构体文件

This commit is contained in:
社会易姐QwQ
2021-06-11 01:03:04 +08:00
parent 7d06579223
commit 555f7ae056
23 changed files with 1926 additions and 2360 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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 TestStream (ProbeStreamReq) returns (ProbeStreamReply);
//
rpc testReq (ProbeReq) returns (ProbeReply);
//
//
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;

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +0,0 @@
syntax = "proto3";
package bilibili.app.wall.v1;
//
service Wall {
//
//
rpc ruleInfo (RuleRequest) returns (RulesReply);
}
//-请求
message RuleRequest {
}
//-回复
message RulesReply {
//
map<string,RulesInfo> rulesInfo = 1;
}
//
message RuleInfo {
//
bool tf = 1;
//
string m = 2;
//
string a = 3;
//
string p = 4;
}
//
message RulesInfo {
//
repeated RuleInfo rulesInfo = 1;
}

View File

@@ -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<string,RulesInfo> 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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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'