update 【gRPC API】 proto files

This commit is contained in:
社会易姐QwQ
2022-02-05 18:34:14 +08:00
parent 9c467bbebc
commit e572a207de
17 changed files with 3722 additions and 1422 deletions

View File

@@ -2,7 +2,7 @@ syntax = "proto3";
package bilibili.account.fission.v1;
//Fission裂变
// Fission裂变
service Fission {
// 活动入口
rpc Entrance (EntranceReq) returns (EntranceReply);

View File

@@ -1,858 +0,0 @@
syntax = "proto3";
package bilibili.dynamic.common;
import "bilibili/app/dynamic/v2/dynamic.proto";
//
message AtGroup {
int32 group_type = 1;
string group_name = 2;
repeated AtItem items = 3;
}
//
enum AtGroupType {
AT_GROUP_TYPE_DEFAULT = 0; //
AT_GROUP_TYPE_RECENT = 1; //
AT_GROUP_TYPE_FOLLOW = 2; //
AT_GROUP_TYPE_FANS = 3; //
AT_GROUP_TYPE_OTHERS = 4; //
}
//
message AtItem {
//
int64 uid = 1;
//
string name = 2;
//
string face = 3;
//
int32 fans = 4;
//
int32 official_verify_type = 5;
}
//
message AtListReq {
//
int64 uid = 1;
}
//
message AtListRsp {
//
repeated AtGroup groups = 1;
}
//
message AtSearchReq {
//
int64 uid = 1;
//
string keyword = 2;
}
//
enum AttachCardType {
ATTACH_CARD_NONE = 0; //
ATTACH_CARD_GOODS = 1; //
ATTACH_CARD_VOTE = 2; //
ATTACH_CARD_UGC = 3; //
ATTACH_CARD_ACTIVITY = 4; //
ATTACH_CARD_OFFICIAL_ACTIVITY = 5; //
ATTACH_CARD_TOPIC = 6; //
ATTACH_CARD_OGV = 7; //
ATTACH_CARD_AUTO_OGV = 8; //
ATTACH_CARD_GAME = 9; //
ATTACH_CARD_MANGA = 10; //
ATTACH_CARD_DECORATION = 11; //
ATTACH_CARD_MATCH = 12; //
ATTACH_CARD_PUGV = 13; //
ATTACH_CARD_RESERVE = 14; //
ATTACH_CARD_UP_TOPIC = 15; //
}
//
message BottomBusiness {
//
int64 rid = 1;
//
int64 type = 2;
}
//
enum ContentType {
CONTENT_TYPE_NONE = 0; //
TEXT = 1; //
AT = 2; //
LOTTERY = 3; //
VOTE = 4; //
TOPIC = 5; //
GOODS = 6; //
BV = 7; //
AV = 8; //
EMOJI = 9; //
USER = 10; //
CV = 11; //
VC = 12; //
WEB = 13; //
TAOBAO = 14; //
MAIL = 15; //
OGV_SEASON = 16; //
OGV_EP = 17; //
}
//
message CreateActivity {
//
int64 activity_id = 1;
//
int32 activity_state = 2;
//
int32 is_new_activity = 3;
//
int32 action = 4;
}
//
message CreateAttachCard {
//
CreateGoodsCard goods = 1;
//
CreateCommonAttachCard common_card = 2;
}
//
message CreateCheckResp {
//
PublishSetting setting = 1;
//
UpPermission permission = 2;
//
ShareChannel share_info = 3;
//
PublishYellowBar yellow_bar = 4;
//
PlusRedDot plus_red_dot = 5;
}
//
message CreateCommonAttachCard {
//
int32 type = 1;
//
int64 biz_id = 2;
//
int32 reserve_source = 3;
//
int32 reserve_lottery = 4;
}
//
message CreateContent {
//
repeated CreateContentItem contents = 1;
}
//
message CreateContentItem {
//
string raw_text = 1;
//
int32 type = 2;
//
string biz_id = 3;
//
GoodsContent goods = 4;
}
//
message CreateDynVideo {
//
string relation_from = 1;
//
int32 biz_from = 3;
//
int32 copyright = 4;
//
int32 no_public = 5;
//
int32 no_reprint = 6;
//
string source = 7;
//
string cover = 8;
//
string title = 9;
//
int64 tid = 10;
//
string tag = 11;
//
string desc = 12;
//
int64 desc_format_id = 13;
//
int32 open_elec = 14;
//
int32 dtime = 15;
//
repeated DynVideoMultiP videos = 16;
//
DynVideoWatermark watermark = 17;
//
int64 mission_id = 18;
//
string dynamic = 19;
//
string dynamic_extension = 20;
//
string dynamic_ctrl = 21;
//
string dynamic_from = 22;
//
int64 lottery_id = 23;
//
DynVideoVote vote = 24;
//
bool up_selection_reply = 25;
//
bool up_close_reply = 26;
//
bool up_close_danmu = 27;
//
int64 up_from = 28;
//
int64 duration = 29;
}
//
message CreateDynVideoResult {
//
int64 aid = 1;
//
string message = 2;
//
DynVideoSubmitActBanner submitact_banner = 3;
//
DynVideoPushIntro push_intro = 4;
}
//
message CreateGoodsCard {
//
repeated string item_id = 1;
}
//
enum CreateInitCheckScene {
CREATE_INIT_CHECK_SCENE_INVALID = 0; //
CREATE_INIT_CHECK_SCENE_NORMAL = 1; //
CREATE_INIT_CHECK_SCENE_REPOST = 2; //
CREATE_INIT_CHECK_SCENE_SHARE = 3; //
CREATE_INIT_CHECK_SCENE_RESERVE_SHARE = 4; //
}
//
message CreateOption {
//
int32 up_choose_comment = 1;
//
int32 close_comment = 2;
//
int32 fold_exclude = 3;
//
int32 audit_level = 4;
//
int32 sync_to_comment = 5;
//
VideoShareInfo video_share_info = 6;
//
CreateActivity activity = 7;
}
//
message CreatePic {
//
string img_src = 1;
//
double img_width = 2;
//
double img_height = 3;
//
double img_size = 4;
//
repeated CreatePicTag img_tags = 5;
}
//
message CreatePicTag {
//
int64 item_id = 1;
//
int64 tid = 2;
//
int64 mid = 3;
//
string text = 4;
//
string text_string = 5;
//
int64 type = 6;
//
int64 source_type = 7;
//
string url = 8;
//
string schema_url = 9;
//
string jump_url = 10;
//
int64 orientation = 11;
//
int64 x = 12;
//
int64 y = 13;
//
string poi = 14;
}
//
message CreateResp {
//
int64 dyn_id = 1;
//
string dyn_id_str = 2;
//
int64 dyn_type = 3;
//
int64 dyn_rid = 4;
//
bilibili.app.dynamic.v2.DynamicItem fake_card = 5;
//
CreateDynVideoResult video_result = 6;
}
//
enum CreateScene {
CREATE_SCENE_INVALID = 0; //
CREATE_SCENE_CREATE_WORD = 1; //
CREATE_SCENE_CREATE_DRAW = 2; //
CREATE_SCENE_CREATE_DYN_VIDEO = 3; //
CREATE_SCENE_REPOST = 4; //
CREATE_SCENE_SHARE_BIZ = 5; //
CREATE_SCENE_SHARE_PAGE = 6; //
CREATE_SCENE_SHARE_PROGRAM = 7; //
CREATE_SCENE_REPLY_SYNC = 8; //
CREATE_SCENE_REPLY_CREATE_ACTIVITY = 9; //
}
//
message CreateTag {
//
ExtLbs lbs = 1;
//
BottomBusiness sdk_game = 2;
//
BottomBusiness diversion = 3;
}
//
message CreateTopic {
//
int64 id = 1;
//
string name = 2;
}
//
message DynIdentity {
//
int64 dyn_id = 1;
//
DynRevsId revs_id = 2;
}
//
message DynRevsId {
//
int64 dyn_type = 1;
//
int64 rid = 2;
}
//
message DynVideoEditor {
//
int64 cid = 1;
//
int32 upfrom = 2;
//
string filters = 3;
//
string fonts = 4;
//
string subtitles = 5;
//
string bgms = 6;
//
string stickers = 7;
//
string videoup_stickers = 8;
//
string trans = 9;
//
string makeups = 10;
//
string surgerys = 11;
//
string videofxs = 12;
//
string themes = 13;
//
string cooperates = 14;
//
string rhythms = 15;
//
string effects = 16;
//
string backgrounds = 17;
//
string videos = 18;
//
string sounds = 19;
//
string flowers = 20;
//
string cover_templates = 21;
//
string tts = 22;
//
string openings = 23;
//
bool record_text = 24;
//
string vupers = 25;
//
string features = 26;
//
string bcut_features = 27;
//
int32 audio_record = 28;
//
int32 camera = 29;
//
int32 speed = 30;
//
int32 camera_rotate = 31;
//
int32 screen_record = 32;
//
int32 default_end = 33;
//
int32 duration = 34;
//
int32 pic_count = 35;
//
int32 video_count = 36;
//
int32 shot_duration = 37;
//
string shot_game = 38;
//
bool highlight = 39;
//
int32 highlight_cnt = 40;
//
int32 pip_count = 41;
}
//
message DynVideoHotAct {
//
int64 act_id = 1;
//
int64 etime = 2;
//
int64 id = 3;
//
string pic = 4;
//
int64 stime = 5;
//
string title = 6;
//
string link = 7;
}
//
message DynVideoMultiP {
//
string title = 1;
//
string filename = 2;
//
int64 cid = 3;
//
DynVideoEditor editor = 4;
}
//
message DynVideoPushIntro {
//
int32 show = 1;
//
string text = 2;
}
//
message DynVideoSubmitActBanner {
//
string hotact_text = 1;
//
string hotact_url = 2;
//
repeated DynVideoHotAct list = 3;
}
//
message DynVideoVote {
//
int64 vote_id = 1;
//
string vote_title = 2;
//
int32 top_for_reply = 3;
}
//
message DynVideoWatermark {
//
int32 state = 1;
//
int32 type = 2;
//
int32 position = 3;
}
//
message ExtLbs {
//
string address = 1;
//
int64 distance = 2;
//
int64 type = 3;
//
string poi = 4;
//
LbsLoc location = 5;
//
string show_title = 6;
//
string title = 7;
//
string show_distance = 8;
}
//
message GetUidByNameReq {
//
repeated string names = 1;
}
//
message GetUidByNameRsp {
//
map<string, int64> uids = 1;
}
//
message GoodsContent {
//
int32 source_type = 1;
//
int64 item_id = 2;
//
int64 shop_id = 3;
}
//
message LaunchedActivity {
//
string module_title = 1;
//
repeated LaunchedActivityItem activities = 2;
//
ShowMoreLaunchedActivity show_more = 3;
}
//
message LaunchedActivityItem {
//
int64 activity_id = 1;
//
string activity_name = 2;
//
int32 activity_state = 3;
}
//
message LbsLoc {
//
double lat = 1;
//
double lng = 2;
}
//
message MetaDataCtrl {
//
string platform = 1;
//
string build = 2;
//
string mobi_app = 3;
//
string buvid = 4;
//
string device = 5;
//
string from_spmid = 6;
//
string from = 7;
//
string trace_id = 8;
//
int32 teenager_mode = 9;
//
int32 cold_start = 10;
//
string version = 11;
//
int32 network = 12;
//
string ip = 13;
}
//
message PlusRedDot {
//
int64 plus_has_red_dot = 1;
}
//
message Program {
//
string title = 1;
//
string desc = 2;
//
string cover = 3;
//
string target_url = 4;
//
string icon = 5;
//
string program_text = 6;
//
string jump_text = 7;
}
//
message PublishSetting {
//
int32 min_words_to_article = 1;
//
int32 max_words_to_article = 2;
//
int32 upload_size = 3;
}
//
message PublishYellowBar {
//
string text = 1;
//
string url = 2;
//
string icon = 3;
}
//
message RepostInitCheck {
//
DynIdentity repost_src = 1;
//
string share_id = 2;
//
int32 share_mode = 3;
}
//
enum ReserveSource {
RESERVE_SOURCE_NEW = 0; //
RESERVE_SOURCE_ASSOCIATED = 1; //
}
//
message ShareChannel {
//
string share_origin = 1;
//
string oid = 2;
//
string sid = 3;
//
repeated ShareChannelItem share_channels = 4;
}
//
message ShareChannelItem {
//
string name = 1;
//
string picture = 2;
//
string share_channel = 3;
//
ShareReserve reserve = 4;
}
//
message ShareReserve {
//
string title = 1;
//
string desc = 2;
//
string qr_code_icon = 3;
//
string qr_code_text = 4;
//
string qr_code_url = 5;
//
string name = 6;
//
string face = 7;
//
ShareReservePoster poster = 8;
//
ShareReserveLottery reserve_lottery = 9;
}
//
message ShareReserveLottery {
//
string icon = 1;
//
string text = 2;
}
//
message ShareReservePoster {
//
string url = 1;
//
double width = 2;
//
double height = 3;
}
//
message ShareResult {
//
int64 share_enable = 1;
//
string toast = 2;
}
//
message ShowMoreLaunchedActivity {
//
string button_text = 1;
//
string jump_url = 2;
}
//
message Sketch {
//
string title = 1;
//
string desc_text = 2;
//
string text = 3;
//
int64 biz_id = 4;
//
int64 biz_type = 5;
//
string cover_url = 6;
//
string target_url = 7;
}
//
message UpPermission {
//
repeated UpPermissionItem items = 1;
//
LaunchedActivity launched_activity = 2;
//
ShareResult share_result = 3;
}
//
message UpPermissionItem {
//
int32 type = 1;
//
int32 permission = 2;
//
string title = 3;
//
string subtitle = 4;
//
string icon = 5;
//
string jump_url = 6;
//
string toast = 7;
//
int64 has_red_dot = 8;
}
//
enum UpPermissionType {
UP_PERMISSION_TYPE_NONE = 0; //
UP_PERMISSION_TYPE_LOTTERY = 1; //
UP_PERMISSION_TYPE_CLIP_PUBLISHED = 2; //
UP_PERMISSION_TYPE_UGC_ATTACH_CARD = 3; //
UP_PERMISSION_TYPE_GOODS_ATTACH_CARD = 4; //
UP_PERMISSION_TYPE_CHOOSE_COMMENT = 5; //
UP_PERMISSION_TYPE_CONTROL_COMMENT = 6; //
UP_PERMISSION_TYPE_CONTROL_DANMU = 7; //
UP_PERMISSION_TYPE_VIDEO_RESERVE = 8; //
UP_PERMISSION_TYPE_LIVE_RESERVE = 9; //
}
//
message UserCreateMeta {
//
MetaDataCtrl app_meta = 1;
//
LbsLoc loc = 2;
//
int32 repost_mode = 3;
}
//
message VideoShareInfo {
//
int64 cid = 1;
//
int32 part = 2;
}

View File

@@ -0,0 +1,875 @@
syntax = "proto3";
package bilibili.dynamic;
import "bilibili/app/dynamic/v2/dynamic.proto";
// at分组信息
message AtGroup {
// 分组类型
AtGroupType group_type = 1;
// 分组名称
string group_name = 2;
// items
repeated AtItem items = 3;
}
// at分组类型
enum AtGroupType {
AT_GROUP_TYPE_DEFAULT = 0; // 默认
AT_GROUP_TYPE_RECENT = 1; // 最近联系
AT_GROUP_TYPE_FOLLOW = 2; // 我的关注(互相关注 > 单向关注)
AT_GROUP_TYPE_FANS = 3; // 我的粉丝
AT_GROUP_TYPE_OTHERS = 4; // 其他
}
// at返回单条信息
message AtItem {
// mid
int64 uid = 1;
// 昵称
string name = 2;
// 头像
string face = 3;
// 粉丝数
int32 fans = 4;
// 认证信息
int32 official_verify_type = 5;
}
// at列表-请求
message AtListReq {
// mid
int64 uid = 1;
}
// at列表-响应
message AtListRsp {
// 分组信息
repeated AtGroup groups = 1;
}
// at搜索-请求
message AtSearchReq {
// mid
int64 uid = 1;
// 关键字
string keyword = 2;
}
//
enum AttachCardType {
ATTACH_CARD_NONE = 0; // 无
ATTACH_CARD_GOODS = 1; // 商品卡
ATTACH_CARD_VOTE = 2; // 投票卡
ATTACH_CARD_UGC = 3; // ugc视频卡
ATTACH_CARD_ACTIVITY = 4; // 帮推
ATTACH_CARD_OFFICIAL_ACTIVITY = 5; // 官方活动
ATTACH_CARD_TOPIC = 6; // 话题活动
ATTACH_CARD_OGV = 7; // OGV
ATTACH_CARD_AUTO_OGV = 8; // OGV自动出卡
ATTACH_CARD_GAME = 9; // 游戏
ATTACH_CARD_MANGA = 10; // 漫画
ATTACH_CARD_DECORATION = 11; // 装扮
ATTACH_CARD_MATCH = 12; // 赛事
ATTACH_CARD_PUGV = 13; // 课程
ATTACH_CARD_RESERVE = 14; // 预约
ATTACH_CARD_UP_TOPIC = 15; // up主话题活动
}
//
message BottomBusiness {
// 业务方资源id
int64 rid = 1;
// 业务方类型定义在BottomBizType中
int64 type = 2;
}
//
enum ContentType {
CONTENT_TYPE_NONE = 0; // 占位
TEXT = 1; // 文本简单内容biz_id就是文本
AT = 2; // @用户简单内容biz_id是用户uid
LOTTERY = 3; // 抽奖简单内容biz_id是抽奖id
VOTE = 4; // 投票简单内容biz_id是投票id
TOPIC = 5; // 话题简单内容biz_id是话题id
GOODS = 6; // 商品文字链复杂内容定义在GoodsContent结构biz_id为空
BV = 7; // bv简单内容biz_id是bvid包括"BV1"等内容
AV = 8; // av简单内容biz_id是avid
EMOJI = 9; // 表情简单内容biz_id为空
USER = 10; // 外露用户,暂未使用
CV = 11; // 专栏简单内容biz_id是cvid
VC = 12; // 废弃业务,无用
WEB = 13; // 网址简单内容biz_id是网页链接
TAOBAO = 14; // 淘宝内容,暂时不用
MAIL = 15; // 邮箱简单内容biz_id是邮箱地址
OGV_SEASON = 16; // 番剧season简单内容biz_id是番剧的season_id
OGV_EP = 17; // 番剧ep简单内容biz_id是番剧的epid
}
//
message CreateActivity {
//
int64 activity_id = 1;
//
int32 activity_state = 2;
//
int32 is_new_activity = 3;
//
int32 action = 4;
}
// 动态附带的附加大卡
message CreateAttachCard {
// 商品大卡
CreateGoodsCard goods = 1;
// 通用附加大卡目前仅限定Match,Game,Ugc,Pugv,Reserve且同时只能有一个
CreateCommonAttachCard common_card = 2;
}
// 发布页预校验-响应
message CreateCheckResp {
// 发布相关的配置项
PublishSetting setting = 1;
// 用户具有的发布权限
UpPermission permission = 2;
// 分享渠道信息
ShareChannel share_info = 3;
// 小黄条
PublishYellowBar yellow_bar = 4;
//
PlusRedDot plus_red_dot = 5;
}
// 创建动态时附带的通用附加卡详情
message CreateCommonAttachCard {
// 通用附加卡的类型
AttachCardType type = 1;
// 通用附加卡的业务id
int64 biz_id = 2;
//
int32 reserve_source = 3;
//
int32 reserve_lottery = 4;
}
// 动态-描述文字模块
message CreateContent {
// 描述信息(已按高亮拆分)
repeated CreateContentItem contents = 1;
}
// 文本描述
message CreateContentItem {
// 原始文案
string raw_text = 1;
// 类型
ContentType type = 2;
// 简单内容可能为文字BVIDAVIDuid等复杂内容需要单独定义结构体
string biz_id = 3;
// 商品内容
GoodsContent goods = 4;
}
//
message CreateDynVideo {
// 投稿平台来源,具体写什么@产品
string relation_from = 1;
// 1 — 投稿入口 + 相册选择视频 2 — 投稿入口 + 拍摄 3 — 小视频入口 + 相册选择视频 4 — 小视频入口 + 拍摄
int32 biz_from = 3;
// 投稿类型: 2-转载、1-自制
int32 copyright = 4;
// 是否公开投稿 0允许公开1不允许公开 默认 0公开
int32 no_public = 5;
// 是否允许转载字段 0允许1不允许默认为0 copyright = 1 自制的时候默认勾选上no_reprint=1
int32 no_reprint = 6;
// 转载的时候必须填写,非空字符串
string source = 7;
// 稿件封面必须填写,不能为空 封面不支持其他源站链接 请确保 cover 是 先经过上传接口
string cover = 8;
// 稿件标题
string title = 9;
// 稿件分区ID 必须是有效的二级分区ID
int64 tid = 10;
// 标签 多个标签请使用英文逗号连接
string tag = 11;
// 稿件描述
string desc = 12;
// 当前输入环境下有就输入http://domain/x/app/archive/desc/format返回的desc_format值
// 如果返回null就输入默认为0 表示当前环境(分区+投稿类型)不参与简介格式化
int64 desc_format_id = 13;
// 稿件是否开启充电面板1为是, 0为否
int32 open_elec = 14;
// 定时发布的时间
int32 dtime = 15;
// 分P聚合字段
repeated DynVideoMultiP videos = 16;
// 水印信息
DynVideoWatermark watermark = 17;
// 新增加通过tag来参加活动
int64 mission_id = 18;
// 新增加可以添加动态内容
string dynamic = 19;
// 序列化后的extend_info扩展信息
string dynamic_extension = 20;
// 客户端控制字段
string dynamic_ctrl = 21;
// 动态来源
string dynamic_from = 22;
// 抽奖服务生成的ID
int64 lottery_id = 23;
//
DynVideoVote vote = 24;
// 精选评论开关, true为开
bool up_selection_reply = 25;
// up主关闭评论
bool up_close_reply = 26;
// up主关闭弹幕
bool up_close_danmu = 27;
// 稿件投稿来源
int64 up_from = 28;
//
int64 duration = 29;
}
// 创建动态视频的应答包(透传给客户端)
message CreateDynVideoResult {
// 稿件id
int64 aid = 1;
// 说明信息
string message = 2;
// 推荐的活动信息
DynVideoSubmitActBanner submitact_banner = 3;
//
DynVideoPushIntro push_intro = 4;
}
// 创建动态时附带的商品大卡详情
message CreateGoodsCard {
// 商品大卡中的商品id
repeated string item_id = 1;
}
// 发布页预校验场景
enum CreateInitCheckScene {
CREATE_INIT_CHECK_SCENE_INVALID = 0; //
CREATE_INIT_CHECK_SCENE_NORMAL = 1; // 动态页面右上角点击进入发布页
CREATE_INIT_CHECK_SCENE_REPOST = 2; // 动态feed流转发、三点分享动态详情页转发
CREATE_INIT_CHECK_SCENE_SHARE = 3; // 其他页面分享到动态
CREATE_INIT_CHECK_SCENE_RESERVE_SHARE = 4; //
}
// 动态创建时的特殊选项
message CreateOption {
// 评论区展示UP自己精选的评论
int32 up_choose_comment = 1;
// 初始评论区是关闭状态
int32 close_comment = 2;
// 该动态不会被折叠
// 目前仅抽奖开奖动态不会被折叠
int32 fold_exclude = 3;
// 审核等级,仅服务端发布时有效
// 100自动过审
// 非100默认的内网审核
// 默认为0
int32 audit_level = 4;
// 根据转发内容同步生成一条源动态/资源的评论
// 仅转发和分享时有效
int32 sync_to_comment = 5;
//
VideoShareInfo video_share_info = 6;
//
CreateActivity activity = 7;
}
// 创建图文动态时的图片信息
message CreatePic {
// 上传图片URL
string img_src = 1;
// 图片宽度
double img_width = 2;
// 图片高度
double img_height = 3;
// 图片大小单位KB
double img_size = 4;
//
repeated CreatePicTag img_tags = 5;
}
//
message CreatePicTag {
//
int64 item_id = 1;
//
int64 tid = 2;
//
int64 mid = 3;
//
string text = 4;
//
string text_string = 5;
//
int64 type = 6;
//
int64 source_type = 7;
//
string url = 8;
//
string schema_url = 9;
//
string jump_url = 10;
//
int64 orientation = 11;
//
int64 x = 12;
//
int64 y = 13;
//
string poi = 14;
}
// 创建动态-响应
message CreateResp {
// 动态id
int64 dyn_id = 1;
// 动态id str
string dyn_id_str = 2;
// 动态的类型
int64 dyn_type = 3;
// 动态id
int64 dyn_rid = 4;
// 假卡
bilibili.app.dynamic.v2.DynamicItem fake_card = 5;
// 视频
CreateDynVideoResult video_result = 6;
}
// 发布类型(场景)
enum CreateScene {
CREATE_SCENE_INVALID = 0; //
CREATE_SCENE_CREATE_WORD = 1; // 发布纯文字动态
CREATE_SCENE_CREATE_DRAW = 2; // 发布图文动态
CREATE_SCENE_CREATE_DYN_VIDEO = 3; // 发布动态视频
CREATE_SCENE_REPOST = 4; // 转发动态
CREATE_SCENE_SHARE_BIZ = 5; // 分享业务方资源
CREATE_SCENE_SHARE_PAGE = 6; // 分享网页(通用模板)
CREATE_SCENE_SHARE_PROGRAM = 7; // 分享小程序
CREATE_SCENE_REPLY_SYNC = 8; // 评论同步到动态
CREATE_SCENE_REPLY_CREATE_ACTIVITY = 9; // 评论同步到动态并且发起活动
}
// 动态附带的小卡
message CreateTag {
// lbs小卡
ExtLbs lbs = 1;
// 游戏通过SDK发布的动态需要带上游戏小卡
BottomBusiness sdk_game = 2;
// 必剪发布的动态需要带上必剪小卡
BottomBusiness diversion = 3;
}
//
message CreateTopic {
//
int64 id = 1;
//
string name = 2;
}
// 动态的标识
message DynIdentity {
// 动态id
int64 dyn_id = 1;
// 动态反向id通过(type+rid组合)也可以唯一标识一个动态与dyn_id出现任意一个即可
DynRevsId revs_id = 2;
}
//
message DynRevsId {
// 动态类型
int64 dyn_type = 1;
// 业务id
int64 rid = 2;
}
// 动态视频分P视频编辑环境上报信息
message DynVideoEditor {
//
int64 cid = 1;
//
int32 upfrom = 2;
// 滤镜
string filters = 3;
// 字体
string fonts = 4;
// 字幕
string subtitles = 5;
// bgm
string bgms = 6;
// 3d拍摄贴纸
string stickers = 7;
// 2d投稿贴纸
string videoup_stickers = 8;
// 视频转场特效
string trans = 9;
// 编辑器的主题使用相关
string makeups = 10;
// 整容之外科手术
string surgerys = 11;
// 美摄特定的videofx
string videofxs = 12;
// 编辑器的主题使用相关
string themes = 13;
// 拍摄之稿件合拍
string cooperates = 14;
// 拍摄之音乐卡点视频
string rhythms = 15;
// mvp特效
string effects = 16;
// mvp背景
string backgrounds = 17;
// mvp视频
string videos = 18;
// mvp音效
string sounds = 19;
// mvp花字
string flowers = 20;
// mvp封面模板
string cover_templates = 21;
// tts
string tts = 22;
// openings
string openings = 23;
// 录音题词
bool record_text = 24;
// 虚拟形象上报
string vupers = 25;
//
string features = 26;
//
string bcut_features = 27;
//
int32 audio_record = 28;
//
int32 camera = 29;
//
int32 speed = 30;
//
int32 camera_rotate = 31;
//
int32 screen_record = 32;
//
int32 default_end = 33;
//
int32 duration = 34;
//
int32 pic_count = 35;
//
int32 video_count = 36;
//
int32 shot_duration = 37;
//
string shot_game = 38;
//
bool highlight = 39;
//
int32 highlight_cnt = 40;
//
int32 pip_count = 41;
}
//
message DynVideoHotAct {
//
int64 act_id = 1;
//
int64 etime = 2;
//
int64 id = 3;
//
string pic = 4;
//
int64 stime = 5;
//
string title = 6;
//
string link = 7;
}
// 动态视频分P聚合字段
message DynVideoMultiP {
// 分P标题
string title = 1;
// 分P的文件名
string filename = 2;
//
int64 cid = 3;
// 编辑环境上报信息
DynVideoEditor editor = 4;
}
//
message DynVideoPushIntro {
//
int32 show = 1;
//
string text = 2;
}
//
message DynVideoSubmitActBanner {
//
string hotact_text = 1;
//
string hotact_url = 2;
//
repeated DynVideoHotAct list = 3;
}
//
message DynVideoVote {
//
int64 vote_id = 1;
//
string vote_title = 2;
//
int32 top_for_reply = 3;
}
// 动态视频水印信息
message DynVideoWatermark {
// 水印状态
// 0-关闭 1-打开 2-预览
int32 state = 1;
// 类型
// 1-用户昵称类型 2-用户id类型 3-用户名在logo下面
int32 type = 2;
// 位置
// 1-左上 2-右上 3-左下 4-右下
int32 position = 3;
}
//
message ExtLbs {
//
string address = 1;
//
int64 distance = 2;
//
int64 type = 3;
//
string poi = 4;
//
LbsLoc location = 5;
//
string show_title = 6;
//
string title = 7;
//
string show_distance = 8;
}
// 根据name取uid-请求
message GetUidByNameReq {
// 查询昵称列表
repeated string names = 1;
}
// 根据name取uid-响应
message GetUidByNameRsp {
// k:昵称 v:mid
map<string, int64> uids = 1;
}
// 发布时附带的商品卡的详细内容
message GoodsContent {
// 商品类型
// 1淘宝、2会员购
int32 source_type = 1;
// 商品的id
int64 item_id = 2;
// 店铺的id兼容老版本
int64 shop_id = 3;
}
// UP已经创建的活动列表
message LaunchedActivity {
// 模块名称,示例:"已创建的活动"
string module_title = 1;
// 已创建的活动列表
repeated LaunchedActivityItem activities = 2;
// 展示更多按钮
// 已创建活动大于5个时下发
ShowMoreLaunchedActivity show_more = 3;
}
// UP已经创建的活动详情
message LaunchedActivityItem {
// 活动id
int64 activity_id = 1;
// 活动名称
string activity_name = 2;
// 活动是否已上线
// 0未上线 1已上线
int32 activity_state = 3;
}
//
message LbsLoc {
// 经度
double lat = 1;
// 纬度
double lng = 2;
}
//
message MetaDataCtrl {
// 客户端平台
string platform = 1;
// 客户端build号
string build = 2;
// 客户端移动设备类型
string mobi_app = 3;
// 客户端buvid
string buvid = 4;
// 用户设备信息
string device = 5;
// 请求来源页面的spmid
string from_spmid = 6;
// 请求来源页面
string from = 7;
// 请求的trace_id
string trace_id = 8;
// 青少年模式
int32 teenager_mode = 9;
// 0:正常 1:冷启动
int32 cold_start = 10;
// 客户端版本号
string version = 11;
// 网络状态
// Unknown=0 WIFI=1 WWAN=2
int32 network = 12;
// 用户ip地址
string ip = 13;
}
//
message PlusRedDot {
//
int64 plus_has_red_dot = 1;
}
// 小程序内容定义
message Program {
// 标题
string title = 1;
// 描述文字
string desc = 2;
// 封面图
string cover = 3;
// 跳转链接
string target_url = 4;
// 小程序icon
string icon = 5;
// 小程序名称
string program_text = 6;
// 跳转链接文案,如:去看看
string jump_text = 7;
}
// 发布相关的设置项
message PublishSetting {
// 提示转为专栏的最小字数使用utf-16编码计算字符数
int32 min_words_to_article = 1;
// 提示转为专栏的最大字数使用utf-16编码计算字符数
int32 max_words_to_article = 2;
// gif上传的最大值单位MB
int32 upload_size = 3;
}
// 发布页小黄条
message PublishYellowBar {
// 展示文案
string text = 1;
// 跳转链接
string url = 2;
// 展示图标
string icon = 3;
}
//
message RepostInitCheck {
//
DynIdentity repost_src = 1;
//
string share_id = 2;
//
int32 share_mode = 3;
}
//
enum ReserveSource {
RESERVE_SOURCE_NEW = 0; //
RESERVE_SOURCE_ASSOCIATED = 1; //
}
// 分享渠道信息
message ShareChannel {
// 业务类型,如动态是"dynamic"
string share_origin = 1;
// 业务资源id
string oid = 2;
// 辅助id, 非必返回字段
string sid = 3;
// 渠道列表
repeated ShareChannelItem share_channels = 4;
}
// 渠道
message ShareChannelItem {
// 展示文案
string name = 1;
// 展示图标
string picture = 2;
// 渠道名称
string share_channel = 3;
// 预约卡分享图信息,仅分享有预约信息的动态时存在
ShareReserve reserve = 4;
}
//
message ShareReserve {
// 标题
string title = 1;
// 描述(时间+类型)
string desc = 2;
// 二维码附带icon
string qr_code_icon = 3;
// 二维码附带文本
string qr_code_text = 4;
// 二维码链接
string qr_code_url = 5;
//
string name = 6;
//
string face = 7;
//
ShareReservePoster poster = 8;
//
ShareReserveLottery reserve_lottery = 9;
}
//
message ShareReserveLottery {
//
string icon = 1;
//
string text = 2;
}
//
message ShareReservePoster {
//
string url = 1;
//
double width = 2;
//
double height = 3;
}
//
message ShareResult {
//
int64 share_enable = 1;
//
string toast = 2;
}
// UP已经创建的活动列表中的展示更多按钮详情
message ShowMoreLaunchedActivity {
// 按钮的文案
string button_text = 1;
// 按钮的跳转链接
string jump_url = 2;
}
// 通用模板的网页元内容(sketch结构)定义
message Sketch {
// 元内容标题长度30限制
string title = 1;
// 描述文字文本内容第二行长度233限制
string desc_text = 2;
// 文本文字文本内容第三行仅限竖图通用卡片使用长度233限制
string text = 3;
// 表示业务方的id表示对于在业务方有唯一标示的必填
int64 biz_id = 4;
// 业务类型,与展示时的右上角标有关,需要业务方向动态申请
int64 biz_type = 5;
// 封面图片链接地址,域名需要符合白名单
string cover_url = 6;
// 跳转链接地址,域名需要符合白名单
string target_url = 7;
}
// 发布相关的权限内容
message UpPermission {
// 通用权限列表
repeated UpPermissionItem items = 1;
// 已经创建的活动列表
LaunchedActivity launched_activity = 2;
//
ShareResult share_result = 3;
}
// 通用发布权限内容的详细定义
message UpPermissionItem {
// 类型enum UpPermissionType
int32 type = 1;
// UP是否有权限
// 1-有2-限制(展示但不可点,仅预约使用)
int32 permission = 2;
// 按钮文案
string title = 3;
// 功能开关的副标题
string subtitle = 4;
// 按钮图标的url地址
string icon = 5;
// 跳转链接permission=1时点击按钮跳到此链接
string jump_url = 6;
// 错误提示permission=2时点击按钮会弹出此提示目前仅预约使用
string toast = 7;
//
int64 has_red_dot = 8;
}
//
enum UpPermissionType {
UP_PERMISSION_TYPE_NONE = 0; // 占位
UP_PERMISSION_TYPE_LOTTERY = 1; // 是否是抽奖的灰度用户,默认不是
UP_PERMISSION_TYPE_CLIP_PUBLISHED = 2; // 之前是否发过小视频,默认没发过
UP_PERMISSION_TYPE_UGC_ATTACH_CARD = 3; // 是否可以添加ugc附加卡默认不可以
UP_PERMISSION_TYPE_GOODS_ATTACH_CARD = 4; // 是否有权限添加商品附加卡
UP_PERMISSION_TYPE_CHOOSE_COMMENT = 5; // 是否有权限自主精选评论白名单,默认没有
UP_PERMISSION_TYPE_CONTROL_COMMENT = 6; // 是否有权限关闭评论区,默认有
UP_PERMISSION_TYPE_CONTROL_DANMU = 7; // 是否有权限关闭弹幕(仅对动态视频生效),默认有
UP_PERMISSION_TYPE_VIDEO_RESERVE = 8; // 是否可以发起稿件预约
UP_PERMISSION_TYPE_LIVE_RESERVE = 9; // 是否可以发起直播预约
}
// 用户主动发布app/web发布时的meta信息
message UserCreateMeta {
// 用户发布客户端的meta信息
MetaDataCtrl app_meta = 1;
// 用户发布时的位置信息(经纬度)
LbsLoc loc = 2;
// 1-发布页转发 2-立即转发
int32 repost_mode = 3;
}
//
message VideoShareInfo {
//
int64 cid = 1;
//
int32 part = 2;
}

View File

@@ -1,6 +1,6 @@
syntax = "proto3";
package bilibili.dynamic.gw;
package bilibili.dynamic.gateway;
import "google/protobuf/any.proto";

View File

@@ -2,22 +2,22 @@ syntax = "proto3";
package bilibili.main.dynamic.feed.v1;
import "bilibili/dynamic/common.proto";
import "bilibili/dynamic/common/dynamic.proto";
//
service Feed {
//
rpc CreateInitCheck(CreateInitCheckReq) returns (bilibili.dynamic.common.CreateCheckResp);
//
rpc CreateInitCheck(CreateInitCheckReq) returns (bilibili.dynamic.CreateCheckResp);
//
rpc SubmitCheck(SubmitCheckReq) returns (SubmitCheckRsp);
//
rpc CreateDyn(CreateDynReq) returns (bilibili.dynamic.common.CreateResp);
//
rpc GetUidByName(bilibili.dynamic.common.GetUidByNameReq) returns (bilibili.dynamic.common.GetUidByNameRsp);
//
rpc AtList(bilibili.dynamic.common.AtListReq) returns (bilibili.dynamic.common.AtListRsp);
//
rpc AtSearch(bilibili.dynamic.common.AtSearchReq) returns (bilibili.dynamic.common.AtListRsp);
//
rpc CreateDyn(CreateDynReq) returns (bilibili.dynamic.CreateResp);
// name取uid
rpc GetUidByName(bilibili.dynamic.GetUidByNameReq) returns (bilibili.dynamic.GetUidByNameRsp);
// at用户推荐列表
rpc AtList(bilibili.dynamic.AtListReq) returns (bilibili.dynamic.AtListRsp);
// at用户搜索列表
rpc AtSearch(bilibili.dynamic.AtSearchReq) returns (bilibili.dynamic.AtListRsp);
//
rpc ReserveButtonClick(ReserveButtonClickReq) returns (ReserveButtonClickResp);
//
@@ -34,34 +34,34 @@ service Feed {
rpc CreatePageInfos(CreatePageInfosReq) returns (CreatePageInfosRsp);
}
//
// -
message CreateDynReq {
//
bilibili.dynamic.common.UserCreateMeta meta = 1;
//
bilibili.dynamic.common.CreateContent content = 2;
//
int32 scene = 3;
//
repeated bilibili.dynamic.common.CreatePic pics = 4;
//
bilibili.dynamic.common.DynIdentity repost_src = 5;
//
bilibili.dynamic.common.CreateDynVideo video = 6;
//
// meta信息
bilibili.dynamic.UserCreateMeta meta = 1;
//
bilibili.dynamic.CreateContent content = 2;
//
bilibili.dynamic.CreateScene scene = 3;
//
repeated bilibili.dynamic.CreatePic pics = 4;
//
bilibili.dynamic.DynIdentity repost_src = 5;
//
bilibili.dynamic.CreateDynVideo video = 6;
// 2048 2049
int64 sketch_type = 7;
//
bilibili.dynamic.Sketch sketch = 8;
//
bilibili.dynamic.Program program = 9;
//
bilibili.dynamic.CreateTag dyn_tag = 10;
//
bilibili.dynamic.CreateAttachCard attach_card = 11;
//
bilibili.dynamic.CreateOption option = 12;
//
bilibili.dynamic.common.Sketch sketch = 8;
//
bilibili.dynamic.common.Program program = 9;
//
bilibili.dynamic.common.CreateTag dyn_tag = 10;
//
bilibili.dynamic.common.CreateAttachCard attach_card = 11;
//
bilibili.dynamic.common.CreateOption option = 12;
//
bilibili.dynamic.common.CreateTopic topic = 13;
bilibili.dynamic.CreateTopic topic = 13;
//
string upload_id = 14;
}
@@ -71,9 +71,9 @@ message CreateInitCheckReq {
//
int32 scene = 1;
//
bilibili.dynamic.common.MetaDataCtrl meta = 2;
bilibili.dynamic.MetaDataCtrl meta = 2;
//
bilibili.dynamic.common.RepostInitCheck repost = 3;
bilibili.dynamic.RepostInitCheck repost = 3;
}
//
@@ -119,8 +119,8 @@ message CreatePlusButtonClickRsp {
//
enum DynamicButtonClickBizType {
DYNAMIC_BUTTON_CLICK_BIZ_TYPE_NONE = 0; //
DYNAMIC_BUTTON_CLICK_BIZ_TYPE_LIVE = 1; //
DYNAMIC_BUTTON_CLICK_BIZ_TYPE_NONE = 0; //
DYNAMIC_BUTTON_CLICK_BIZ_TYPE_LIVE = 1; //
DYNAMIC_BUTTON_CLICK_BIZ_TYPE_DYN_UP = 2; //
}
@@ -205,9 +205,9 @@ enum ReserveButtonStatus {
//
message SubmitCheckReq {
//
bilibili.dynamic.common.CreateContent content = 1;
bilibili.dynamic.CreateContent content = 1;
//
repeated bilibili.dynamic.common.CreatePic pics = 2;
repeated bilibili.dynamic.CreatePic pics = 2;
}
//

View File

@@ -22,4 +22,229 @@ service GalleryInterface {
rpc AgreePolicy (AgreePolicyReq) returns (AgreePolicyReply);
//
rpc GetLastPolicy (GetLastPolicyReq) returns (GetLastPolicyReply);
}
//
message AgreePolicyReply {
}
//
message AgreePolicyReq {
//
PolicyType policy_type = 1;
//
string version = 2;
}
//
message BasicInfoReply {
//
string customer_service_url = 1;
//
string agreement_url = 2;
//
string privacy_url = 3;
//
repeated Link links = 4;
}
//
message BasicInfoReq {
//
int64 mid = 1;
}
//
message Display {
//
string bg_theme_light = 1;
//
string bg_theme_night = 2;
//
string nft_poster = 3;
//
string nft_raw = 4;
}
//
enum GT14Status {
LT14 = 0; //
GE14 = 1; //
UNKNOWN_GT14 = 2; //
}
//
message GetLastPolicyReply {
//
string short_desc = 1;
//
string detail_jump = 2;
//
string version = 3;
}
//
message GetLastPolicyReq {
//
PolicyType policy_type = 1;
}
//
message GetUserInfoReply {
//
int64 mid = 1;
//
string name = 2;
//
string address = 3;
//
string avatar_url = 4;
//
string help_url = 5;
}
//
message GetUserInfoReq {
//
int64 mid = 1;
}
//
message Link {
//
string name = 1;
//
string link_url = 2;
//
string track_event_id = 3;
}
//
message ListNFTByMidReply {
//
repeated NFT nfts = 1;
//
int64 anchor_id = 2;
//
bool end = 3;
}
//
message ListNFTByMidReq {
//
int64 mid = 1;
//
string category = 2;
//
string biz_type = 3;
//
int64 anchor_id = 4;
//
int64 page_size = 5;
}
//
message ListOrderByMidReply {
//
repeated Order orders = 1;
//
int64 anchor_id = 2;
//
bool end = 3;
}
//
message ListOrderByMidReq {
//
int64 mid = 1;
//
int64 anchor_id = 2;
//
int64 page_size = 3;
}
//
message NFT {
//
string nft_id = 1;
//
string item_name = 2;
//
string serial_number = 3;
//
string issuer = 4;
//
Display display = 5;
//
string detail_url = 6;
//
NFTStatus nft_status = 7;
//
int64 item_id = 8;
}
//
enum NFTStatus {
UNDEFINED = 0; //
NORMAL = 1; //
DOING = 2; //
}
//
message Order {
//
string item_name = 1;
//
string serial_number = 2;
//
string tx_hash = 3;
//
string tx_time = 4;
//
string issuer = 5;
//
string issue_time = 6;
//
string token_id = 7;
//
Display display = 8;
//
string contract_address = 9;
//
string hash_jump = 10;
//
string contract_jump = 11;
//
bool disable_browser_jump = 12;
}
//
enum PolicyAgreeStatus {
UNSIGNED = 0; //
ACCEPTED = 1; //
EXPIRED = 2; //
}
//
enum PolicyType {
UNKNOWN_POLICY = 0; //
WALLET = 1; //
SALE = 2; //
}
//
message UserCheckReply {
//
int32 policy_status = 1;
//
int32 gt14 = 2;
}
//
message UserCheckReq {
//
int64 mid = 1;
//
int32 policy_type = 2;
}

View File

@@ -4,7 +4,7 @@ package bilibili.pgc.gateway.player.v1;
import "bilibili/app/playurl/v1/playurl.proto";
// PlayURL 播放地址
// 播放地址
service PlayURL {
// 播放页信息
rpc PlayView (PlayViewReq) returns (PlayViewReply);
@@ -14,6 +14,105 @@ service PlayURL {
rpc LivePlayView (LivePlayViewReq) returns (LivePlayViewReply);
}
// 其他业务信息
message BusinessInfo {
// 当前视频是否是预览
bool is_preview = 1;
// 用户是否承包过
bool bp = 2;
// drm使用
string marlin_token = 3;
}
// 事件
message Event {
// 震动
Shake shake = 1;
}
// 播放信息
message LivePlayInfo {
//
int32 current_qn = 1;
//
repeated QualityDescription quality_description = 2;
//
repeated ResponseDataUrl durl = 3;
}
// 直播播放页信息-响应
message LivePlayViewReply {
// 房间信息
RoomInfo room_info = 1;
// 播放信息
LivePlayInfo play_info = 2;
}
// 直播播放页信息-请求
message LivePlayViewReq {
// 剧集epid
int64 ep_id = 1;
// 清晰度
// 0,10000:原画 400:蓝光 250:超清 150:高清 80:流畅
uint32 quality = 2;
// 类型
// 0:音频 2:hevc 4:dash 8:p2p, 16:蒙版
uint32 ptype = 3;
// 是否请求https
bool https = 4;
// 0:默认直播间播放 1:投屏播放
uint32 play_type = 5;
// 投屏设备
// 0:默认其他 1:OTT设备
int32 device_type = 6;
}
// 禁用功能配置
message PlayAbilityConf {
bool background_play_disable = 1; // 后台播放
bool flip_disable = 2; // 镜像反转
bool cast_disable = 3; // 投屏
bool feedback_disable = 4; // 反馈
bool subtitle_disable = 5; // 字幕
bool playback_rate_disable = 6; // 播放速度
bool time_up_disable = 7; // 定时停止
bool playback_mode_disable = 8; // 播放方式
bool scale_mode_disable = 9; // 画面尺寸
bool like_disable = 10; // 赞
bool dislike_disable = 11; // 踩
bool coin_disable = 12; // 投币
bool elec_disable = 13; // 充电
bool share_disable = 14; // 分享
bool screen_shot_disable = 15; // 截图
bool lock_screen_disable = 16; // 锁定
bool recommend_disable = 17; // 相关推荐
bool playback_speed_disable = 18; // 播放速度
bool definition_disable = 19; // 清晰度
bool selections_disable = 20; // 选集
bool next_disable = 21; // 下一集
bool edit_dm_disable = 22; // 编辑弹幕
bool small_window_disable = 23; // 小窗
bool shake_disable = 24; // 震动
bool outer_dm_disable = 25; // 外层面板弹幕设置
bool inner_dm_disable = 26; // 三点内弹幕设置
bool freya_enter_disable = 27; // 一起看入口
bool dolby_disable = 28; // 杜比音效
bool freya_full_disable = 29; // 全屏一起看入口
bool skip_oped_switch_disable = 30; //
}
// 播放页信息-响应
message PlayViewReply {
// 视频流信息
bilibili.app.playurl.v1.VideoInfo video_info = 1;
// 播放控件用户自定义配置
PlayAbilityConf play_conf = 2;
// 业务需要的其他信息
BusinessInfo business = 3;
// 事件
Event event = 4;
}
// 播放页信息-请求
message PlayViewReq {
// 剧集epid
@@ -48,6 +147,11 @@ message PlayViewReq {
int64 room_id = 14;
}
// 投屏地址-响应
message ProjectReply {
bilibili.app.playurl.v1.PlayURLReply project = 1;
}
// 投屏地址-请求
message ProjectReq {
// 剧集epid
@@ -78,105 +182,31 @@ message ProjectReq {
// 投屏设备
// 0:默认其他 1:OTT设备
int32 device_type = 12;
//
bool use_new_project_code = 13;
}
// 播放页信息-响应
message PlayViewReply {
// 视频流信息
bilibili.app.playurl.v1.VideoInfo video_info = 1;
// 播放控件用户自定义配置
PlayAbilityConf play_conf = 2;
// 业务需要的其他信息
BusinessInfo business = 3;
// 事件
Event event = 4;
//
message QualityDescription {
//
int32 qn = 1;
//
string desc = 2;
}
// 事件
message Event {
// 震动
Shake shake = 1;
}
// 震动
message Shake {
// 文件地址
string file = 1;
}
// 其他业务信息
message BusinessInfo {
// 当前视频是否是预览
bool is_preview = 1;
// 用户是否承包过
bool bp = 2;
// drm使用
string marlin_token = 3;
}
// 禁用功能配置
message PlayAbilityConf {
bool background_play_disable = 1; // 后台播放
bool flip_disable = 2; // 镜像反转
bool cast_disable = 3; // 投屏
bool feedback_disable = 4; // 反馈
bool subtitle_disable = 5; // 字幕
bool playback_rate_disable = 6; // 播放速度
bool time_up_disable = 7; // 定时停止
bool playback_mode_disable = 8; // 播放方式
bool scale_mode_disable = 9; // 画面尺寸
bool like_disable = 10; // 赞
bool dislike_disable = 11; // 踩
bool coin_disable = 12; // 投币
bool elec_disable = 13; // 充电
bool share_disable = 14; // 分享
bool screen_shot_disable = 15; // 截图
bool lock_screen_disable = 16; // 锁定
bool recommend_disable = 17; // 相关推荐
bool playback_speed_disable = 18; // 播放速度
bool definition_disable = 19; // 清晰度
bool selections_disable = 20; // 选集
bool next_disable = 21; // 下一集
bool edit_dm_disable = 22; // 编辑弹幕
bool small_window_disable = 23; // 小窗
bool shake_disable = 24; // 震动
bool outer_dm_disable = 25; // 外层面板弹幕设置
bool inner_dm_disable = 26; // 三点内弹幕设置
bool freya_enter_disable = 27; // 一起看入口
bool dolby_disable = 28; // 杜比音效
bool freya_full_disable = 29; // 全屏一起看入口
}
// 投屏地址-响应
message ProjectReply {
bilibili.app.playurl.v1.PlayURLReply project = 1;
}
// 直播播放页信息-请求
message LivePlayViewReq {
// 剧集epid
int64 ep_id = 1;
// 清晰度
// 0,10000:原画 400:蓝光 250:超清 150:高清 80:流畅
uint32 quality = 2;
// 类型
// 0:音频 2:hevc 4:dash 8:p2p, 16:蒙版
uint32 ptype = 3;
// 是否请求https
bool https = 4;
// 0:默认直播间播放 1:投屏播放
uint32 play_type = 5;
// 投屏设备
// 0:默认其他 1:OTT设备
int32 device_type = 6;
}
// 直播播放页信息-响应
message LivePlayViewReply {
// 房间信息
RoomInfo room_info = 1;
// 播放信息
LivePlayInfo play_info = 2;
//
message ResponseDataUrl {
string url = 1;
// 表示stream类型,按位表示
// Value| 1 | 1 | 1 | 1 | 1
// --------------------------------------------
// desc | mask | p2p | dash | hevc | only-audio
uint32 stream_type = 2;
// 表示支持p2p的cdn厂商,按位表示
// 值 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
// -----------------------------------------------
// CDN | hw | bdy | bsy | ws | txy | qn | js | bvc
uint32 ptag = 3;
}
// 房间信息
@@ -191,6 +221,16 @@ message RoomInfo {
RoomShowInfo show = 4;
}
// 房间信息-展示相关
message RoomShowInfo {
// 短号
int64 short_id = 1;
// 人气值
int64 popularity_count = 8;
// 最近一次开播时间戳
int64 live_start_time = 10;
}
// 房间信息-状态相关
message RoomStatusInfo {
// 直播间状态
@@ -218,45 +258,8 @@ message RoomStatusInfo {
int64 room_shield = 9;
}
// 房间信息-展示相关
message RoomShowInfo {
// 短号
int64 short_id = 1;
// 人气值
int64 popularity_count = 8;
// 最近一次开播时间戳
int64 live_start_time = 10;
// 震动
message Shake {
// 文件地址
string file = 1;
}
// 播放信息
message LivePlayInfo {
//
int32 current_qn = 1;
//
repeated QualityDescription quality_description = 2;
//
repeated ResponseDataUrl durl = 3;
}
//
message QualityDescription {
//
int32 qn = 1;
//
string desc = 2;
}
//
message ResponseDataUrl {
string url = 1;
// 表示stream类型,按位表示
// Value| 1 | 1 | 1 | 1 | 1
// --------------------------------------------
// desc | mask | p2p | dash | hevc | only-audio
uint32 stream_type = 2;
// 表示支持p2p的cdn厂商,按位表示
// 值 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
// -----------------------------------------------
// CDN | hw | bdy | bsy | ws | txy | qn | js | bvc
uint32 ptag = 3;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
syntax = "proto3";
package bilibili.polymer.contract;
import "google/protobuf/empty.proto";
//
service Contract {
//
rpc AddContract(AddContractReq) returns (google.protobuf.Empty);
}
//
message AddContractReq {
//
CommonReq common = 1;
//
int64 mid = 2;
//
int64 up_mid = 3;
//
int64 aid = 4;
}
//
message CommonReq {
//
string platform = 1;
//
int32 build = 2;
//
string buvid = 3;
//
string mobi_app = 4;
//
string device = 5;
//
string ip = 6;
//
string spmid = 7;
}

View File

@@ -0,0 +1,15 @@
syntax = "proto3";
package bilibili.polymer.demo;
//
message HelloWorldReq {
//
string content = 1;
}
//
message HelloWorldResp {
//
string data = 1;
}

View File

@@ -0,0 +1,46 @@
syntax = "proto3";
package bilibili.polymer.list;
//
service List {
//
rpc FavoriteTab(FavoriteTabReq) returns (FavoriteTabReply);
//
rpc CheckAccount(CheckAccountReq) returns (CheckAccountReply);
}
//
message CheckAccountReply {
//
bool is_new = 1;
}
//
message CheckAccountReq {
//
int64 uid = 1;
//
string periods = 2;
}
//
message FavoriteTabItem {
//
string name = 1;
//
string uri = 2;
//
string type = 3;
}
//
message FavoriteTabReply {
//
repeated FavoriteTabItem items = 1;
}
//
message FavoriteTabReq {
}

View File

@@ -11,6 +11,6 @@ message Status {
int32 code = 1;
// 业务错误信息
string message = 2;
//扩展信息嵌套(相当于该messasge的套娃)
// 扩展信息嵌套(相当于该messasge的套娃)
repeated google.protobuf.Any details = 3;
}

View File

@@ -0,0 +1,291 @@
syntax = "proto3";
package bilibili.tv.interfaces.dm.v1;
//
message CommandDmOtt {
//
int64 id = 1;
//
int64 oid = 2;
//
int64 mid = 3;
//
int32 type = 4;
//
string command = 5;
//
string content = 6;
//
int32 state = 7;
//
int32 progress = 8;
//
string ctime = 9;
//
string mtime = 10;
//
string extra = 11;
//
string id_str = 12;
}
//
message CommandDmsOttReply {
//
repeated CommandDmOtt command_dms_ott = 1;
}
//
message CommandDmsOttReq {
//
int64 aid = 1;
//
int64 cid = 2;
//
int64 mid = 3;
}
// 弹幕ai云屏蔽列表
message DanmakuAIFlag {
// 弹幕ai云屏蔽条目
repeated DanmakuFlag dm_flags = 1;
}
// 弹幕条目
message DanmakuElem {
// 弹幕dmid
int64 id = 1;
// 弹幕出现位置(单位ms)
int32 progress = 2;
// 弹幕类型
int32 mode = 3;
// 弹幕字号
int32 fontsize = 4;
// 弹幕颜色
uint32 color = 5;
// 发送着mid hash
string midHash = 6;
// 弹幕正文
string content = 7;
// 发送时间
int64 ctime = 8;
// 权重 区间:[1,10]
int32 weight = 9;
// 动作
string action = 10;
// 弹幕池
int32 pool = 11;
// 弹幕dmid str
string idStr = 12;
// 弹幕属性位(bin求AND)
// bit0:保护 bit1:直播 bit2:高赞
int32 attr = 13;
}
// 弹幕ai云屏蔽条目
message DanmakuFlag {
int64 dmid = 1; // 弹幕dmid
uint32 flag = 2; // 评分
}
// 云屏蔽配置信息
message DanmakuFlagConfig {
// 云屏蔽等级
int32 rec_flag = 1;
// 云屏蔽文案
string rec_text = 2;
// 云屏蔽开关
int32 rec_switch = 3;
}
// 弹幕默认配置
message DanmuDefaultPlayerConfig {
bool player_danmaku_use_default_config = 1; // 是否使用推荐弹幕设置
bool player_danmaku_ai_recommended_switch = 4; // 是否开启智能云屏蔽
int32 player_danmaku_ai_recommended_level = 5; // 智能云屏蔽等级
bool player_danmaku_blocktop = 6; // 是否屏蔽顶端弹幕
bool player_danmaku_blockscroll = 7; // 是否屏蔽滚动弹幕
bool player_danmaku_blockbottom = 8; // 是否屏蔽底端弹幕
bool player_danmaku_blockcolorful = 9; // 是否屏蔽彩色弹幕
bool player_danmaku_blockrepeat = 10; // 是否屏蔽重复弹幕
bool player_danmaku_blockspecial = 11; // 是否屏蔽高级弹幕
float player_danmaku_opacity = 12; // 弹幕不透明度
float player_danmaku_scalingfactor = 13; // 弹幕缩放比例
float player_danmaku_domain = 14; // 弹幕显示区域
int32 player_danmaku_speed = 15; // 弹幕速度
bool inline_player_danmaku_switch = 16; // 是否开启弹幕
int32 player_danmaku_senior_mode_switch = 17; //
}
// 弹幕配置
message DanmuPlayerConfig {
bool player_danmaku_switch = 1; // 是否开启弹幕
bool player_danmaku_switch_save = 2; // 是否记录弹幕开关设置
bool player_danmaku_use_default_config = 3; // 是否使用推荐弹幕设置
bool player_danmaku_ai_recommended_switch = 4; // 是否开启智能云屏蔽
int32 player_danmaku_ai_recommended_level = 5; // 智能云屏蔽等级
bool player_danmaku_blocktop = 6; // 是否屏蔽顶端弹幕
bool player_danmaku_blockscroll = 7; // 是否屏蔽滚动弹幕
bool player_danmaku_blockbottom = 8; // 是否屏蔽底端弹幕
bool player_danmaku_blockcolorful = 9; // 是否屏蔽彩色弹幕
bool player_danmaku_blockrepeat = 10; // 是否屏蔽重复弹幕
bool player_danmaku_blockspecial = 11; // 是否屏蔽高级弹幕
float player_danmaku_opacity = 12; // 弹幕不透明度
float player_danmaku_scalingfactor = 13; // 弹幕缩放比例
float player_danmaku_domain = 14; // 弹幕显示区域
int32 player_danmaku_speed = 15; // 弹幕速度
bool player_danmaku_enableblocklist = 16; // 是否开启屏蔽列表
bool inline_player_danmaku_switch = 17; // 是否开启弹幕
int32 inline_player_danmaku_config = 18; //
int32 player_danmaku_ios_switch_save = 19; //
}
// 弹幕显示区域自动配置
message DanmuPlayerDynamicConfig {
// 时间
int32 progress = 1;
// 弹幕显示区域
float player_danmaku_domain = 14;
}
// 弹幕配置信息
message DanmuPlayerViewConfig {
// 弹幕默认配置
DanmuDefaultPlayerConfig danmuku_default_player_config = 1;
// 弹幕用户配置
DanmuPlayerConfig danmuku_player_config = 2;
// 弹幕显示区域自动配置列表
repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 3;
}
// 获取弹幕-响应
message DmSegMobileReply {
// 弹幕列表
repeated DanmakuElem elems = 1;
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
int32 state = 2;
// 弹幕云屏蔽ai评分值
DanmakuAIFlag ai_flag = 3;
}
// 获取弹幕-请求
message DmSegMobileReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
// 是否青少年模式
int32 teenagers_mode = 5;
//
int64 from = 6;
}
// 客户端弹幕元数据-响应
message DmViewReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 智能防挡弹幕蒙版信息
VideoMask mask = 2;
// 视频字幕
VideoSubtitle subtitle = 3;
// 高级弹幕专包url(bfs)
repeated string special_dms = 4;
// 云屏蔽配置信息
DanmakuFlagConfig ai_flag = 5;
// 弹幕配置信息
DanmuPlayerViewConfig player_config = 6;
// 弹幕发送框样式
int32 send_box_style = 7;
// 是否允许
bool allow = 8;
// check box 是否展示
string check_box = 9;
// check box 展示文本
string check_box_show_msg = 10;
// 展示文案
string text_placeholder = 11;
// 弹幕输入框文案
string input_placeholder = 12;
}
// 客户端弹幕元数据-请求
message DmViewReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 页面spm
string spmid = 4;
// 是否冷启
int32 is_hard_boot = 5;
//
int64 from = 6;
}
// 单个字幕信息
message SubtitleItem {
// 字幕id
int64 id = 1;
// 字幕id str
string id_str = 2;
// 字幕语言代码
string lan = 3;
// 字幕语言
string lan_doc = 4;
// 字幕文件url
string subtitle_url = 5;
// 字幕作者信息
UserInfo author = 6;
}
// 字幕作者信息
message UserInfo {
// 用户mid
int64 mid = 1;
// 用户昵称
string name = 2;
// 用户性别
string sex = 3;
// 用户头像url
string face = 4;
// 用户签名
string sign = 5;
// 用户等级
int32 rank = 6;
}
// 智能防挡弹幕蒙版信息
message VideoMask {
// 视频cid
int64 cid = 1;
// 平台
// 0:web端 1:客户端
int32 plat = 2;
// 帧率
int32 fps = 3;
// 间隔时间
int64 time = 4;
// 蒙版url
string mask_url = 5;
}
// 视频字幕信息
message VideoSubtitle {
// 视频原语言代码
string lan = 1;
// 视频原语言
string lanDoc = 2;
// 视频字幕列表
repeated SubtitleItem subtitles = 3;
}

View File

@@ -2,8 +2,37 @@ syntax = "proto3";
package bilibili.vega.deneb.v1;
import "google/protobuf/any.proto";
//
service VegaDenebRPC {
//
rpc MessagePulls (MessagePullsReq) returns (MessagePullsReply);
}
}
//
message MessagePullsReply {
//
repeated google.protobuf.Any data = 1;
//
int32 pn = 2;
//
int32 ps = 3;
//
int64 count = 4;
//
bool has_next = 5;
}
//
message MessagePullsReq {
//
int64 start_seq_id = 1;
//
int64 end_seq_id = 2;
//
int32 pn = 3;
//
int32 ps = 4;
}

File diff suppressed because it is too large Load Diff