diff --git a/grpc_api/bilibili/account/fission/v1/fission.proto b/grpc_api/bilibili/account/fission/v1/fission.proto index a4bf5ff..bb9353c 100644 --- a/grpc_api/bilibili/account/fission/v1/fission.proto +++ b/grpc_api/bilibili/account/fission/v1/fission.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package bilibili.account.fission.v1; -//Fission裂变 +// Fission裂变 service Fission { // 活动入口 rpc Entrance (EntranceReq) returns (EntranceReply); diff --git a/grpc_api/bilibili/dynamic/common.proto b/grpc_api/bilibili/dynamic/common.proto deleted file mode 100644 index 6ced9b9..0000000 --- a/grpc_api/bilibili/dynamic/common.proto +++ /dev/null @@ -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 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; -} diff --git a/grpc_api/bilibili/dynamic/common/dynamic.proto b/grpc_api/bilibili/dynamic/common/dynamic.proto new file mode 100644 index 0000000..39d966b --- /dev/null +++ b/grpc_api/bilibili/dynamic/common/dynamic.proto @@ -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; + // 简单内容,可能为文字,BVID,AVID,uid等;复杂内容需要单独定义结构体 + 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 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; +} diff --git a/grpc_api/bilibili/dynamic/gw.proto b/grpc_api/bilibili/dynamic/gw/gateway.proto similarity index 99% rename from grpc_api/bilibili/dynamic/gw.proto rename to grpc_api/bilibili/dynamic/gw/gateway.proto index 08a1fc1..ad4589c 100644 --- a/grpc_api/bilibili/dynamic/gw.proto +++ b/grpc_api/bilibili/dynamic/gw/gateway.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bilibili.dynamic.gw; +package bilibili.dynamic.gateway; import "google/protobuf/any.proto"; diff --git a/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto b/grpc_api/bilibili/dynamic/interfaces/feed/v1/api.proto similarity index 62% rename from grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto rename to grpc_api/bilibili/dynamic/interfaces/feed/v1/api.proto index 981f2e4..a3308eb 100644 --- a/grpc_api/bilibili/dynamic/interfaces/feed/v1/feed.proto +++ b/grpc_api/bilibili/dynamic/interfaces/feed/v1/api.proto @@ -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; } // diff --git a/grpc_api/bilibili/pangu/gallery/v1/gallery.proto b/grpc_api/bilibili/pangu/gallery/v1/gallery.proto index 2c7b35c..74218f0 100644 --- a/grpc_api/bilibili/pangu/gallery/v1/gallery.proto +++ b/grpc_api/bilibili/pangu/gallery/v1/gallery.proto @@ -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; } \ No newline at end of file diff --git a/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto index f7916d5..8cbd0a1 100644 --- a/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto +++ b/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto @@ -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; -} \ No newline at end of file diff --git a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto index c45b74f..0b2d9fa 100644 --- a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto +++ b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto @@ -8,6 +8,96 @@ import "google/protobuf/timestamp.proto"; service PlayURL { // 播放页信息 rpc PlayView (PlayViewReq) returns (PlayViewReply); + // + rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); +} + +// 角标信息 +message BadgeInfo { + // 角标文案 + string text = 1; + // 角标色值 + string bg_color = 2; + // 角标色值-夜间模式 + string bg_color_night = 3; + // 文案色值 + string text_color = 4; + // + GradientColor bg_gradient_color = 5; +} + +// +message BottomDisplay { + // + TextInfo title = 1; + // + string icon = 2; +} + +// 按钮信息 +message ButtonInfo { + // 按钮文案 + string text = 1; + // 按钮字体色值 + string text_color = 2; + // 按钮字体色值-夜间模式 + string text_color_night = 3; + // 按钮背景色 + string bg_color = 4; + // 按钮背景色-夜间模式 + string bg_color_night = 5; + // 按钮链接 + string link = 6; + // 按钮动作类型 + string action_type = 7; + // 角标信息 + BadgeInfo badge_info = 8; + // 埋点上报信息 + Report report = 9; + // 左侧删除线样式文案 + string left_strikethrough_text = 10; + // 缩略按钮文案信息 + TextInfo simple_text_info = 11; + // 缩略按钮背景色值 + string simple_bg_color = 12; + // 缩略按钮字体色值-夜间模式 + string simple_bg_color_night = 13; + // + GradientColor bg_gradient_color = 14; + // + map order_report_params = 15; +} + +// +message CastTips { + // + int32 code = 1; + // + string message = 2; +} + +// +message ClipInfo { + // + int64 material_no = 1; + // + int32 start = 2; + // + int32 end = 3; + // + ClipType clip_type = 4; + // + string toast_text = 5; + // + MultiView multi_view = 6; +} + +enum ClipType { + NT_UNKNOWN = 0; // + CLIP_TYPE_OP = 1; // + CLIP_TYPE_ED = 2; // + CLIP_TYPE_HE = 3; // + CLIP_TYPE_MULTI_VIEW = 4; // } // 编码类型 @@ -17,20 +107,411 @@ enum CodeType { CODE265 = 2; // H.265 } +// +message ContinuePlayInfo { + // + int64 continue_play_ep_id = 1; +} + +// 优惠券 +message Coupon { + // 优惠券token + string coupon_token = 1; + // 优惠券类型 + // 1:折扣券 2:满减券 3:兑换券 + int64 type = 2; + // 优惠券面值 + string value = 3; + // 优惠券使用描述 + string use_desc = 4; + // 优惠券标题 + string title = 5; + // 优惠券描述 + string desc = 6; + // 优惠券支付按钮文案 + string pay_button_text = 7; + // 优惠券支付按钮删除线文案 + string pay_button_text_line_through = 8; + // 实付金额 + string real_amount = 9; + // 使用过期时间 + google.protobuf.Timestamp expire_time = 10; +} + +// 优惠券信息 +message CouponInfo { + // 提示框信息 + CouponToast toast = 1; + // 弹窗信息 + PopWin pop_win = 2; +} + +// 优惠券提示框文案信息 +message CouponTextInfo { + // 提示框文案-播正片6分钟预览 + string positive_preview = 1; + // 提示框文案-播非正片分节ep + string section = 2; +} + +// 优惠券提示框信息 +message CouponToast { + // 提示框文案信息 + CouponTextInfo text_info = 1; + // 提示框按钮 + ButtonInfo button = 2; +} + +// dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; +} + +// dash视频流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; +} + +// 鉴权浮层 +message Dialog { + // 鉴权限制码 + int64 code = 1; + // 鉴权限制信息 + string msg = 2; + // 浮层类型 + string type = 3; + // 浮层样式类型 + string style_type = 4; + // 浮层配置 + DialogConfig config = 5; + // 标题 + TextInfo title = 6; + // 副标题 + TextInfo subtitle = 7; + // 图片信息 + ImageInfo image = 8; + // 按钮列表 + repeated ButtonInfo button = 9; + // 底部描述 + ButtonInfo bottom_desc = 10; + // 埋点上报信息 + Report report = 11; + // 倒计时 秒 + int32 count_down_sec = 12; + // 右下描述 + TextInfo right_bottom_desc = 13; + // + repeated BottomDisplay bottom_display = 14; +} + +// 鉴权浮层配置 +message DialogConfig { + // 是否显示高斯模糊背景图 + bool is_show_cover = 1; + // 是否响应转屏 + bool is_orientation_enable = 2; + // 是否响应上滑吸顶 + bool is_nested_scroll_enable = 3; + // 是否强制竖屏 + bool is_force_halfscreen_enable = 4; +} + +// +message Dimension { + // + int32 width = 1; + // + int32 height = 2; + // + int32 rotate = 3; +} + +// 杜比音频信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + DashItem audio = 2; +} + +// +enum DrmTechType { + NON = 0; // + FAIR_PLAY = 1; // +} + +// 播放结束页 +message EndPage { + // 鉴权浮层 + Dialog dialog = 1; + // 播放完后是否隐藏end_page + bool hide = 2; +} + +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + +// +message FreyaConfig { + // + string desc = 1; + // + int32 type = 2; + // + int32 issued_cnt = 3; + // + bool is_always_show = 4; + // + int32 screen_number = 5; + // + int32 full_screen_number = 6; +} + +// +message GradientColor { + // + string start_color = 1; + // + string end_color = 2; +} + +// +message HighDefinitionTrialInfo { + // + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Report report = 7; + // + ButtonInfo quality_open_tip_btn = 8; + // + ButtonInfo no_longer_trial_btn = 9; +} + +// 图片信息 +message ImageInfo { + // 图片链接 + string url = 1; +} + +// +enum InlineScene { + UNKNOWN = 0; // + RELATED_EP = 1; // + HE = 2; // + SKIP = 3; // +} + +// +enum InlineType { + TYPE_UNKNOWN = 0; // + TYPE_WHOLE = 1; // + TYPE_HE_CLIP = 2; // + TYPE_PREVIEW = 3; // +} + +// +message MultiView { + // + string button_material = 1; + // + int64 ep_id = 2; + // + int64 cid = 3; + // + int64 avid = 4; +} + +// +message PayTip { + // + string title = 1; + // + string url = 2; + // + string icon = 3; + // + int32 type = 4; + // + int32 show_type = 5; + // + string img = 6; + // + string bg_day_color = 7; + // + string bg_night_color = 8; + // + string bg_line_color = 9; + // + string bg_night_line_color = 10; + // + string text_color = 11; + // + string text_night_color = 12; + // + int64 view_start_time = 13; + // + repeated ButtonInfo button = 14; + // + int32 url_open_type = 15; + // + Report report = 16; + // + int32 angle_style = 17; + // + int32 report_type = 18; + // + map order_report_params = 19; +} + +// 禁用功能配置 +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; // + bool record_screen_disable = 31; // + bool color_optimize_disable = 32; // +} + +// 云控扩展配置信息 +message PlayAbilityExtConf { + // 自定义配置扩展信息 + bool allow_close_subtitle = 1; + // + FreyaConfig freya_config = 2; + // + CastTips cast_tips = 3; +} + // 错误码 enum PlayErr { NoErr = 0; // WithMultiDeviceLoginErr = 1; // 管控类型的错误码 } -// 清晰度不满足条件信息 -message StreamLimit { - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 提示信息 - string msg = 3; +// 其他业务信息 +message PlayViewBusinessInfo { + // 当前视频是否是预览 + bool is_preview = 1; + // 用户是否承包过 + bool bp = 2; + // drm使用 + string marlin_token = 3; + // 倍速动效色值 + string playback_speed_color = 4; + // + ContinuePlayInfo continue_play_info = 5; + // + repeated ClipInfo clip_info = 6; + // + InlineType inline_type = 7; + // + int32 ep_whole_duration = 8; + // + Dimension dimension = 9; + // + map quality_ext_map = 10; + // + map exp_map = 11; + // + DrmTechType drm_tech_type = 12; +} + +// 播放页信息-响应 +message PlayViewReply { + // 视频流信息 + VideoInfo video_info = 1; + // 播放控件用户自定义配置 + PlayAbilityConf play_conf = 2; + // 业务需要的其他信息 + PlayViewBusinessInfo business = 3; + // 事件 + Event event = 4; + // 展示信息 + ViewInfo view_info = 5; + // 自定义配置扩展信息 + PlayAbilityExtConf play_ext_conf = 6; } // 播放页信息-请求 @@ -69,134 +550,60 @@ message PlayViewReq { bool is_need_view_info = 15; // 场景控制 SceneControl scene_control = 16; -} - -// 场景控制 -message SceneControl { - // 是否收藏播单 - bool fav_playlist = 1; - // 是否小窗 - bool small_window = 2; - // 是否画中画 - bool pip = 3; -} - -// 播放页信息-响应 -message PlayViewReply { - // 视频流信息 - VideoInfo video_info = 1; - // 播放控件用户自定义配置 - PlayAbilityConf play_conf = 2; - // 业务需要的其他信息 - PlayViewBusinessInfo business = 3; - // 事件 - Event event = 4; - // 展示信息 - ViewInfo view_info = 5; - // 自定义配置扩展信息 - PlayAbilityExtConf play_ext_conf = 6; -} - -// 展示信息 -message ViewInfo { - // 鉴权浮层 - Dialog dialog = 1; - // toast - Toast toast = 2; - // 优惠券信息 - CouponInfo coupon_info = 3; - // 未购买的超前点播ep列表 - repeated int64 demand_no_pay_epids = 4; - // 播放结束页 - EndPage end_page = 5; // - map exp_config = 6; - // 弹窗 - PopWin pop_win = 7; + InlineScene inline_scene = 17; + // + int64 material_no = 18; } -// 播放结束页 -message EndPage { - // 鉴权浮层 - Dialog dialog = 1; - // 播放完后是否隐藏end_page - bool hide = 2; +// 弹窗信息 +message PopWin { + // 弹窗标题 老字段 + string title = 1; + // 优惠券列表 + repeated Coupon coupon = 2; + // 弹窗按钮列表 + repeated ButtonInfo button = 3; + // 底部文案 老字段 + string bottom_text = 4; + // 弹窗标题 新字段 + TextInfo pop_title = 5; + // 弹窗副标题 + TextInfo subtitle = 6; + // 底部描述 新字段 + ButtonInfo bottom_desc = 7; + // 弹窗小图 + string cover = 8; + // 弹窗类型 + string pop_type = 9; } -// toast -message Toast { - // toast文案 老字段 - string text = 1; - // toast按钮 - ButtonInfo button = 2; - // 显示样式类型 - int32 show_style_type = 3; - // 图标 - string icon = 4; - // toast文案 新字段 - TextInfo toast_text = 5; - // 埋点上报信息 - Report report = 6; +// +message PromptBar { + // + TextInfo title = 1; + // + TextInfo sub_title = 2; + // + string sub_title_icon = 3; + // + string bg_image = 4; + // + GradientColor bg_gradient_color = 5; + // + repeated ButtonInfo button = 6; + // + Report report = 7; + // + string full_screen_ip_icon = 8; + // + GradientColor full_screen_bg_gradient_color = 9; } -// 鉴权浮层 -message Dialog { - // 鉴权限制码 - int64 code = 1; - // 鉴权限制信息 - string msg = 2; - // 浮层类型 - string type = 3; - // 浮层样式类型 - string style_type = 4; - // 浮层配置 - DialogConfig config = 5; - // 标题 - TextInfo title = 6; - // 副标题 - TextInfo subtitle = 7; - // 图片信息 - ImageInfo image = 8; - // 按钮列表 - repeated ButtonInfo button = 9; - // 底部描述 - ButtonInfo bottom_desc = 10; - // 埋点上报信息 - Report report = 11; - // 倒计时 秒 - int32 count_down_sec = 12; - // 右下描述 - TextInfo right_bottom_desc = 13; -} - -// 按钮信息 -message ButtonInfo { - // 按钮文案 - string text = 1; - // 按钮字体色值 - string text_color = 2; - // 按钮字体色值-夜间模式 - string text_color_night = 3; - // 按钮背景色 - string bg_color = 4; - // 按钮背景色-夜间模式 - string bg_color_night = 5; - // 按钮链接 - string link = 6; - // 按钮动作类型 - string action_type = 7; - // 角标信息 - BadgeInfo badge_info = 8; - // 埋点上报信息 - Report report = 9; - // 左侧删除线样式文案 - string left_strikethrough_text = 10; - // 缩略按钮文案信息 - TextInfo simple_text_info = 11; - // 缩略按钮背景色值 - string simple_bg_color = 12; - // 缩略按钮字体色值-夜间模式 - string simple_bg_color_night = 13; +// +message QualityExtInfo { + // + bool trial_support = 1; } // 埋点上报信息 @@ -209,116 +616,6 @@ message Report { string extends = 3; } -// 角标信息 -message BadgeInfo { - // 角标文案 - string text = 1; - // 角标色值 - string bg_color = 2; - // 角标色值-夜间模式 - string bg_color_night = 3; - // 文案色值 - string text_color = 4; -} - -// 图片信息 -message ImageInfo { - // 图片链接 - string url = 1; -} - -// 文案信息 -message TextInfo { - // 文案 - string text = 1; - // 字体色值 - string textColor = 2; - // 字体色值-夜间模式 - string textColorNight = 3; -} - -// 鉴权浮层配置 -message DialogConfig { - // 是否显示高斯模糊背景图 - bool is_show_cover = 1; - // 是否响应转屏 - bool is_orientation_enable = 2; - // 是否响应上滑吸顶 - bool is_nested_scroll_enable = 3; - // 是否强制竖屏 - bool is_force_halfscreen_enable = 4; -} - -// 视频url信息 -message VideoInfo { - // 视频清晰度 - uint32 quality = 1; - // 视频格式 - string format = 2; - // 视频时长 - uint64 timelength = 3; - // 视频编码id - uint32 video_codecid = 4; - // 视频流 - repeated Stream stream_list = 5; - // 伴音流 - repeated DashItem dash_audio = 6; - // 杜比伴音流 - DolbyItem dolby = 7; -} - -// 杜比音频信息 -message DolbyItem { - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - DashItem audio = 2; -} - -// dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; -} - -// 视频流信息 -message Stream { - // 元数据 - StreamInfo info = 1; - // 流数据 - oneof contentCase { - // dash流 - DashVideo dash_video = 2; - // 分段流 - SegmentVideo segment_video = 3; - } -} - -//分段视频流 -message SegmentVideo { - //分段视频流列表 - repeated ResponseUrl segment = 1; -} - // 分段流条目 message ResponseUrl { // 分段序号 @@ -335,6 +632,45 @@ message ResponseUrl { string md5 = 6; } +// 场景控制 +message SceneControl { + // 是否收藏播单 + bool fav_playlist = 1; + // 是否小窗 + bool small_window = 2; + // 是否画中画 + bool pip = 3; + // + bool was_he_inline = 4; + // + bool is_need_trial = 5; +} + +//分段视频流 +message SegmentVideo { + //分段视频流列表 + repeated ResponseUrl segment = 1; +} + +// 震动 +message Shake { + // 文件地址 + string file = 1; +} + +// 视频流信息 +message Stream { + // 元数据 + StreamInfo info = 1; + // 流数据 + oneof content { + // dash流 + DashVideo dash_video = 2; + // 分段流 + SegmentVideo segment_video = 3; + } +} + // 流媒体元数据 message StreamInfo { // 清晰度 @@ -365,156 +701,84 @@ message StreamInfo { string superscript = 13; } -// dash视频流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// 震动 -message Shake { - // 文件地址 - string file = 1; -} - -// 其他业务信息 -message PlayViewBusinessInfo { - // 当前视频是否是预览 - bool is_preview = 1; - // 用户是否承包过 - bool bp = 2; - // drm使用 - string marlin_token = 3; - // 倍速动效色值 - string playback_speed_color = 4; -} - -// 优惠券信息 -message CouponInfo { - // 提示框信息 - CouponToast toast = 1; - // 弹窗信息 - PopWin pop_win = 2; -} - -// 弹窗信息 -message PopWin { - // 弹窗标题 老字段 +// 清晰度不满足条件信息 +message StreamLimit { + // 标题 string title = 1; - // 优惠券列表 - repeated Coupon coupon = 2; - // 弹窗按钮列表 - repeated ButtonInfo button = 3; - // 底部文案 老字段 - string bottom_text = 4; - // 弹窗标题 新字段 - TextInfo pop_title = 5; - // 弹窗副标题 - TextInfo subtitle = 6; - // 底部描述 新字段 - ButtonInfo bottom_desc = 7; - // 弹窗小图 - string cover = 8; - // 弹窗类型 - string pop_type = 9; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; } -// 优惠券 -message Coupon { - // 优惠券token - string coupon_token = 1; - // 优惠券类型 - // 1:折扣券 2:满减券 3:兑换券 - int64 type = 2; - // 优惠券面值 - string value = 3; - // 优惠券使用描述 - string use_desc = 4; - // 优惠券标题 - string title = 5; - // 优惠券描述 - string desc = 6; - // 优惠券支付按钮文案 - string pay_button_text = 7; - // 优惠券支付按钮删除线文案 - string pay_button_text_line_through = 8; - // 实付金额 - string real_amount = 9; - // 使用过期时间 - google.protobuf.Timestamp expire_time = 10; +// 文案信息 +message TextInfo { + // 文案 + string text = 1; + // 字体色值 + string textColor = 2; + // 字体色值-夜间模式 + string textColorNight = 3; } -// 提示框信息 -message CouponToast { - // 提示框文案信息 - CouponTextInfo text_info = 1; - // 提示框按钮 +// toast +message Toast { + // toast文案 老字段 + string text = 1; + // toast按钮 ButtonInfo button = 2; + // 显示样式类型 + int32 show_style_type = 3; + // 图标 + string icon = 4; + // toast文案 新字段 + TextInfo toast_text = 5; + // 埋点上报信息 + Report report = 6; + // + map order_report_params = 7; } -// 提示框文案信息 -message CouponTextInfo { - // 提示框文案-播正片6分钟预览 - string positive_preview = 1; - // 提示框文案-播非正片分节ep - string section = 2; +// 视频url信息 +message VideoInfo { + // 视频清晰度 + uint32 quality = 1; + // 视频格式 + string format = 2; + // 视频时长 + uint64 timelength = 3; + // 视频编码id + uint32 video_codecid = 4; + // 视频流 + repeated Stream stream_list = 5; + // 伴音流 + repeated DashItem dash_audio = 6; + // 杜比伴音流 + DolbyItem dolby = 7; } -// 禁用功能配置 -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 PlayAbilityExtConf { - // 自定义配置扩展信息 - bool allow_close_subtitle = 1; +// 展示信息 +message ViewInfo { + // 鉴权浮层 + Dialog dialog = 1; + // toast + Toast toast = 2; + // 优惠券信息 + CouponInfo coupon_info = 3; + // 未购买的超前点播ep列表 + repeated int64 demand_no_pay_epids = 4; + // 播放结束页 + EndPage end_page = 5; + // + map exp_config = 6; + // 弹窗 + PopWin pop_win = 7; + // + PromptBar try_watch_prompt_bar = 8; + // + PayTip pay_tip = 9; + // + HighDefinitionTrialInfo high_definition_trial_info = 10; + // + map ext_dialog = 11; } \ No newline at end of file diff --git a/grpc_api/bilibili/polymer/contract/contract.proto b/grpc_api/bilibili/polymer/contract/contract.proto new file mode 100644 index 0000000..a987ced --- /dev/null +++ b/grpc_api/bilibili/polymer/contract/contract.proto @@ -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; +} + diff --git a/grpc_api/bilibili/polymer/demo/demo.proto b/grpc_api/bilibili/polymer/demo/demo.proto new file mode 100644 index 0000000..b874f11 --- /dev/null +++ b/grpc_api/bilibili/polymer/demo/demo.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package bilibili.polymer.demo; + +// +message HelloWorldReq { + // + string content = 1; +} + +// +message HelloWorldResp { + // + string data = 1; +} diff --git a/grpc_api/bilibili/polymer/list/list.proto b/grpc_api/bilibili/polymer/list/list.proto new file mode 100644 index 0000000..a4e228f --- /dev/null +++ b/grpc_api/bilibili/polymer/list/list.proto @@ -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 { + +} diff --git a/grpc_api/bilibili/rpc/status.proto b/grpc_api/bilibili/rpc/status.proto index c120a1b..14f976d 100644 --- a/grpc_api/bilibili/rpc/status.proto +++ b/grpc_api/bilibili/rpc/status.proto @@ -11,6 +11,6 @@ message Status { int32 code = 1; // 业务错误信息 string message = 2; - //扩展信息嵌套(相当于该messasge的套娃) + // 扩展信息嵌套(相当于该messasge的套娃) repeated google.protobuf.Any details = 3; } diff --git a/grpc_api/bilibili/tv/interfaces/dm/v1/dm.proto b/grpc_api/bilibili/tv/interfaces/dm/v1/dm.proto new file mode 100644 index 0000000..a3f88ba --- /dev/null +++ b/grpc_api/bilibili/tv/interfaces/dm/v1/dm.proto @@ -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; +} diff --git a/grpc_api/bilibili/vega/deneb/v1/deneb.proto b/grpc_api/bilibili/vega/deneb/v1/deneb.proto index df6df37..396064b 100644 --- a/grpc_api/bilibili/vega/deneb/v1/deneb.proto +++ b/grpc_api/bilibili/vega/deneb/v1/deneb.proto @@ -2,8 +2,37 @@ syntax = "proto3"; package bilibili.vega.deneb.v1; +import "google/protobuf/any.proto"; + // service VegaDenebRPC { // rpc MessagePulls (MessagePullsReq) returns (MessagePullsReply); -} \ No newline at end of file +} + +// +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; +} + diff --git a/grpc_api/bilibili/web/interfaces/v1/interfaces.proto b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto new file mode 100644 index 0000000..9100896 --- /dev/null +++ b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto @@ -0,0 +1,1259 @@ +syntax = "proto3"; + +package bilibili.web.interfaces.v1; + +// +message AccInfo { + // + int64 mid = 1; + // + string name = 2; + // + string sex = 3; + // + string face = 4; + // + string sign = 5; +} + +// +message AccountCard { + // + string mid = 1; + // + string name = 2; + // + string sex = 3; + // + string rank = 4; + // + string face = 5; + // + int32 spacesta = 6; + // + string sign = 7; + // + CardLevelInfo level_info = 8; + // + PendantInfo pendant = 9; + // + NameplateInfo nameplate = 10; + // + OfficialInfo official = 11; + // + OfficialVerify official_verify = 12; + // + CardVip vip = 13; + // + int64 fans = 14; + // + int64 friend = 15; + // + int64 attention = 16; +} + +// +message ActivityArchiveReply { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + ReqUser req_user = 4; + // + repeated Staff staff = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; +} + +// +message ActivityArchiveReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivityEpisode { + // + int64 id = 1; + // + int64 aid = 2; + // + string bvid = 3; + // + int64 cid = 4; + // + string title = 5; + // + string cover = 6; + // + Author author = 7; + // + Rights rights = 8; +} + +// +message ActivityGame { + // + repeated ActivityGameIframe iframes = 1; + // + string disclaimer = 2; + // + string disclaimer_url = 3; +} + +// +message ActivityGameIframe { + // + string url = 1; + // + int64 height = 2; +} + +// +message ActivityLive { + // + int64 room_id = 1; + // + int64 now_time = 2; + // + int64 start_time = 3; + // + int64 end_time = 4; + // + string hover_pic = 5; + // + string hover_jump_url = 6; + // + int64 break_cycle = 7; + // + repeated LiveTimeline timeline = 8; + // + OperationRelate operation_relate = 9; + // + int64 reply_type = 10; + // + int64 reply_id = 11; + // + string hover_pic_close = 12; + // + string gift_disclaimer = 13; +} + +// +message ActivityLiveTimeInfoReply { + // + int64 now_time = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + repeated LiveTimeline timeline = 4; +} + +// +message ActivityLiveTimeInfoReq { + // + string activity_key = 1; +} + +// +message ActivitySeasonReply { + // + ActivitySeasonStatus status = 1; + // + string title = 2; + // + ActivityLive live = 3; + // + ActivitySubscribe subscribe = 4; + // + ActivityGame game = 5; + // + ActivityView view = 6; + // + ActivityTheme theme = 7; +} + +// +message ActivitySeasonReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivitySeasonSection { + // + int64 id = 1; + // + string title = 2; + // + int64 type = 3; + // + repeated ActivityEpisode episodes = 4; +} + +// +enum ActivitySeasonStatus { + StatusNone = 0; // + StatusLive = 1; // + StatusView = 2; // +} + +// +message ActivitySubscribe { + // + bool status = 1; + // + string title = 2; + // + string button_title = 3; + // + string button_selected_title = 4; + // + int64 season_stat_view = 5; + // + int64 season_stat_danmaku = 6; + // + OrderType order_type = 7; + oneof param { + // + ReserveActivityParam reserve_activity_param = 8; + // + FavSeasonParam fav_season_param = 9; + // + JumpURLParam jump_URL_param = 10; + } +} + +// +message ActivityTheme { + // + string base_color = 1; + // + string loading_bg_color = 2; + // + string operated_bg_color = 3; + // + string default_element_color = 4; + // + string hover_element_color = 5; + // + string selected_element_color = 6; + // + string base_font_color = 7; + // + string info_font_color = 8; + // + string mask_bg_color = 9; + // + string page_bg_color = 10; + // + string center_logo_img = 11; + // + string page_bg_img = 12; + // + string decorations2233_img = 13; + // + string main_banner_bg_img = 14; + // + string main_banner_title_img = 15; + // + string like_animation_img = 16; + // + string combo_like_img = 17; + // + string combo_coin_img = 18; + // + string combo_fav_img = 19; + // + string arrow_btn_img = 20; + // + string share_icon_bg_img = 21; + // + string live_list_location_img = 22; + // + string live_list_location_img_active = 23; + // + string player_loading_img = 24; + // + string share_img = 25; + // + map kv_color = 26; +} + +// +message ActivityView { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + repeated Staff staff = 4; + // + ReqUser req_user = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; + // + repeated ActivitySeasonSection sections = 8; +} + +// +message Arc { + // + int64 aid = 1; + // + int64 videos = 2; + // + int32 type_id = 3; + // + string type_name = 4; + // + int32 copyright = 5; + // + string pic = 6; + // + string title = 7; + // + int64 pubdate = 8; + // + int64 ctime = 9; + // + string desc = 10; + // + int32 state = 11; + // + int32 access = 12; + // + int32 attribute = 13; + // + string tag = 14; + // + repeated string tags = 15; + // + int64 duration = 16; + // + int64 mission_id = 17; + // + int64 order_id = 18; + // + string redirect_url = 19; + // + int64 forward = 20; + // + Rights rights = 21; + // + Author author = 22; + // + Stat stat = 23; + // + string report_result = 24; + // + string dynamic = 25; + // + int64 first_cid = 26; + // + Dimension dimension = 27; + // + repeated StaffInfo staff_info = 28; + // + int64 season_id = 29; + // + repeated DescV2 desc_v2 = 30; +} + +// +message Author { + // + int64 mid = 1; + // + string name = 2; + // + string face = 3; +} + +// +message Card { + // + AccountCard card = 1; + // + Space space = 2; + // + bool following = 3; + // + int64 archive_count = 4; + // + int32 article_count = 5; + // + int64 follower = 6; +} + +// +message CardLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message CardVip { + // + int32 type = 1; + // + string due_remark = 2; + // + int32 access_status = 3; + // + int32 vip_status = 4; + // + string vip_status_warn = 5; + // + int32 theme_type = 6; +} + +message ClickActivitySeasonReq { + // + OrderType order_type = 1; + oneof param { + // + ReserveActivityParam reserve_activity_param = 2; + // + FavSeasonParam fav_season_param = 3; + // + JumpURLParam jump_URL_param = 4; + } + // + string spmid = 5; + // + int64 action = 6; +} + +// +message DescV2 { + // + string raw_text = 1; + // + int64 type = 2; + // + int64 biz_id = 3; +} + +// +message Dimension { + // + int64 width = 1; + // + int64 height = 2; + // + int64 rotate = 3; +} + +// +message FavSeasonParam { + // + int64 season_id = 1; +} + +// +message HotReply { + // + ReplyPage page = 1; + // + repeated Reply replies = 2; +} + +// +message JumpURLParam { + // + string jump_url = 1; +} + +// +message LiveTimeline { + // + string name = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + string cover = 4; + // + string subtitle = 5; + // + string h5_cover = 6; +} + +// +message NameplateInfo { + // + int32 nid = 1; + // + string name = 2; + // + string image = 3; + // + string image_small = 4; + // + string level = 5; + // + string condition = 6; +} + +// +message NoReply { + +} + +// +message OfficialInfo { + // + int32 role = 1; + // + string title = 2; + // + string desc = 3; +} + +// +message OfficialVerify { + // + int32 type = 1; + // + string desc = 2; +} + +// +message OperationRelate { + // + string title = 1; + // + repeated RelateItem relate_item = 2; + // + repeated Relate ai_relate_item = 3; +} + +// +enum OrderType { + TypeNone = 0; // + TypeOrderActivity = 1; // + TypeFavSeason = 2; // + TypeClick = 3; // +} + +// +message Page { + // + int64 cid = 1; + // + int32 page = 2; + // + string from = 3; + // + string part = 4; + // + int64 duration = 5; + // + string vid = 6; + // + string desc = 7; + // + string weblink = 8; + // + Dimension dimension = 9; +} + +// +message PendantInfo { + // + int32 pid = 1; + // + string name = 2; + // + string image = 3; + // + int64 expire = 4; +} + +// +message Relate { + // + Arc arc = 1; + // + string bvid = 2; + // + int64 season_type = 3; +} + +// +message RelateItem { + // + string url = 1; + // + string cover = 2; +} + +// +message Relation { + // + int64 attribute = 1; + // + int64 special = 3; +} + +// +message Reply { + // + int64 rpid = 1; + // + int64 oid = 2; + // + int32 type = 3; + // + int64 mid = 4; + // + int64 root = 5; + // + int64 parent = 6; + // + int64 dialog = 7; + // + int32 count = 8; + // + int32 rcount = 9; + // + int32 floor = 10; + // + int32 state = 11; + // + int32 fans_grade = 12; + // + int32 attr = 13; + // + int64 ctime = 14; + // + string rpid_str = 15; + // + string root_str = 16; + // + string parent_str = 17; + // + string dialog_str = 18; + // + int32 like = 19; + // + int32 hate = 20; + // + int32 action = 21; + // + ReplyMember member = 22; + // + ReplyContent content = 23; + // + repeated Reply replies = 24; + // + int32 assist = 25; + // + ReplyFolder folder = 26; + // + ReplyUpAction up_action = 27; + // + ReplyLabel label = 28; + // + string raw_input = 29; + // + bool show_follow = 30; +} + +// +message ReplyContent { + // + int64 rp_id = 1; + // + string message = 2; + // + ReplyVote vote = 3; + // + repeated string topics = 5; + // + int32 ip = 6; + // + int32 plat = 7; + // + string device = 8; + // + string version = 9; + // + repeated ReplyMemberInfo members = 10; + // + map emote = 11; +} + +// +message ReplyEmote { + // + int64 id = 1; + // + int64 package_id = 2; + // + int64 state = 3; + // + int64 type = 4; + // + int64 attr = 5; + // + string text = 6; + // + string url = 7; + // + ReplyEmoteMeta meta = 8; + // + int64 ctime = 9; + // + int64 mtime = 10; +} + +// +message ReplyEmoteMeta { + // + ReplyEmoteMetaSize size = 1; +} + +// +enum ReplyEmoteMetaSize { + EMOTE_META_SIZE_UNSPECIFIED = 0; // + EMOTE_META_SIZE_SMALL = 1; // + EMOTE_META_SIZE_BIG = 2; // +} + +// +message ReplyFansDetail { + // + int64 uid = 1; + // + int32 medal_id = 2; + // + string medal_name = 3; + // + int32 score = 4; + // + int32 level = 5; + // + int32 intimacy = 6; + // + int32 status = 7; + // + int32 received = 8; +} + +// +message ReplyFolder { + // + bool has_folded = 1; + // + bool is_folded = 2; + // + string rule = 3; +} + +// +message ReplyLabel { + // + int64 rpid = 1; + // + string content = 2; + // + string text_color = 3; + // + string text_color_night_mode = 4; + // + string bg_color = 5; + // + string bg_color_night_mode = 6; + // + string link = 7; + // + string position = 8; +} + +// +message ReplyLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message ReplyMember { + // + ReplyMemberInfo info = 1; + // + ReplyFansDetail fans_detail = 2; + // + int32 following = 3; +} + +// +message ReplyMemberInfo { + // + int32 role = 1; + // + string mid = 2; + // + string name = 3; + // + string sex = 4; + // + string sign = 5; + // + string avatar = 6; + // + string rank = 7; + // + string display_rank = 8; + // + ReplyLevelInfo level_info = 9; + // + PendantInfo pendant = 10; + // + NameplateInfo nameplate = 11; + // + OfficialVerify official_verify = 12; + // + ReplyVip vip = 13; +} + +// +message ReplyPage { + // + int64 acount = 1; + // + int64 count = 2; + // + int64 num = 3; + // + int64 size = 4; +} + +// +message ReplyUpAction { + // + bool like = 1; + // + bool reply = 2; +} + +// +message ReplyVip { + // + int32 type = 1; + // + int64 due_date = 2; + // + string due_remark = 3; + // + int32 access_status = 4; + // + int32 vip_status = 5; + // + string vip_status_warn = 6; + // + int32 theme_type = 7; + // + VipLabel label = 8; +} + +// +message ReplyVote { + // + int64 id = 1; + // + string title = 2; + // + int32 cnt = 3; + // + string desc = 4; + // + bool deleted = 5; +} + +// +message ReqUser { + // + bool favorite = 1; + // + bool like = 2; + // + bool dislike = 3; + // + int64 multiply = 4; +} + +// +message ReserveActivityParam { + // + int64 reserve_id = 1; + // + string from = 2; + // + string type = 3; + // + int64 oid = 4; +} + +// +message Rights { + // + int32 bp = 1; + // + int32 elec = 2; + // + int32 download = 3; + // + int32 movie = 4; + // + int32 pay = 5; + // + int32 hd5 = 6; + // + int32 no_reprint = 7; + // + int32 autoplay = 8; + // + int32 ugc_pay = 9; + // + int32 is_cooperation = 10; + // + int32 ugc_pay_preview = 11; +} + +// +message SeasonEpisode { + // + int64 season_id = 1; + // + int64 section_id = 2; + // + int64 id = 3; + // + int64 aid = 4; + // + int64 cid = 5; + // + string title = 6; + // + int64 attribute = 7; + // + Arc arc = 8; + // + Page page = 9; + // + string bvid = 10; +} + +// +message SeasonSection { + // + int64 season_id = 1; + // + int64 id = 2; + // + string title = 3; + // + int64 type = 4; + // + repeated SeasonEpisode episodes = 5; +} + +// +message SeasonStat { + // + int64 season_id = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; +} + +// +message Space { + // + string s_img = 1; + // + string l_img = 2; +} + +// +message Staff { + // + int64 mid = 1; + // + string title = 2; + // + string name = 3; + // + string face = 4; + // + VipInfo vip = 5; + // + OfficialInfo official = 6; + // + int64 follower = 7; + // + int32 label_style = 8; + // + Relation relation = 9; +} + +// +message StaffInfo { + // + int64 mid = 1; + // + string title = 2; +} + +// +message Stat { + // + int64 aid = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; + // + int32 dislike = 11; + // + string evaluation = 12; + // + string argue_msg = 13; +} + +// +message Subtitle { + // + bool allow_submit = 1; + // + repeated SubtitleItem list = 2; +} + +// +message SubtitleItem { + // + int64 id = 1; + // + string lan = 2; + // + string lan_doc = 3; + // + bool is_lock = 4; + // + int64 author_mid = 5; + // + string subtitle_url = 6; + // + AccInfo author = 7; +} + +// +message Tag { + // + int64 id = 1; + // + string name = 2; + // + string cover = 3; + // + string head_cover = 4; + // + string content = 5; + // + string short_content = 6; + // + int32 type = 7; + // + int32 state = 8; + // + int64 ctime = 9; + // + TagCount tag_count = 10; + // + int32 is_atten = 11; + // + int64 likes = 12; + // + int64 hates = 13; + // + int32 attribute = 14; + // + int32 liked = 15; + // + int32 hated = 16; +} + +// +message TagCount { + // + int64 view = 1; + // + int64 use = 2; + // + int64 atten = 3; +} + +// +message UGCPayAsset { + // + int64 price = 1; + // + map platform_price = 2; +} + +// +message UGCSeason { + // + int64 id = 1; + // + string title = 2; + // + string cover = 3; + // + int64 mid = 4; + // + string intro = 5; + // + int32 sign_state = 6; + // + int64 attribute = 7; + // + repeated SeasonSection sections = 8; + // + SeasonStat stat = 9; + // + int64 ep_count = 10; + // + int64 season_type = 11; +} + +// +message View { + // + Arc arc = 1; + // + bool no_cache = 2; + // + repeated Page pages = 3; + // + Subtitle subtitle = 4; + // + UGCPayAsset asset = 5; + // + ViewLabel label = 6; + // + repeated Staff staff = 7; + // + UGCSeason ugc_season = 8; + // + int64 stein_guide_cid = 9; +} + +// +message ViewDetailReply { + // + View view = 1; + // + Card card = 2; + // + repeated Tag tags = 3; + // + HotReply reply = 4; + // + repeated Arc related = 5; +} + +// +message ViewDetailReq { + // + int64 aid = 1; + // + string bvid = 2; +} + +// +message ViewLabel { + // + int64 type = 1; +} + +// +message VipInfo { + // + int32 type = 1; + // + int32 status = 2; + // + int32 vip_pay_type = 3; + // + int32 theme_type = 4; +} + +// +message VipLabel { + // + string path = 1; +} diff --git a/grpc_api/pgc/biz/room.proto b/grpc_api/pgc/biz/room.proto new file mode 100644 index 0000000..296082e --- /dev/null +++ b/grpc_api/pgc/biz/room.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package pgc.biz; + +// +message RoomProto { + // + repeated string room_id = 1; +} \ No newline at end of file diff --git a/grpc_api/pgc/gaetway/vega/v1/vega.proto b/grpc_api/pgc/gaetway/vega/v1/vega.proto new file mode 100644 index 0000000..10d22ab --- /dev/null +++ b/grpc_api/pgc/gaetway/vega/v1/vega.proto @@ -0,0 +1,100 @@ +syntax = "proto3"; + +package pgc.gateway.vega.v1; + +import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; + +// +service Vega { + // + rpc CreateTunnel (VegaFrame) returns (VegaFrame); +} + +// +service VegaFrameDoc { + // + rpc Auth (AuthReq) returns (AuthResp); + // + rpc Heartbeat (HeartbeatReq) returns (HeartbeatResp); + // + rpc MessageAck (MessageAckReq) returns (google.protobuf.Empty); + // + rpc Subscribe (SubscribeReq) returns (google.protobuf.Empty); +} + +// +message AuthReq { + +} + +// +message AuthResp { + +} + +// +message FrameOption { + // + int64 vega_id = 1; + // + string req_id = 2; + // + int64 sequence = 3; + // + bool is_ack = 4; + // + Status status = 5; + // + string ack_origin = 6; + // + int64 mid = 7; +} + +// +message HeartbeatReq { + +} + +// +message HeartbeatResp { + +} + +// +message MessageAckReq { + // + string vega_id = 1; + // + string req_id = 2; + // + string origin = 3; + // + string target_path = 4; +} + +// +message SubscribeReq { + // + repeated TargetPath target_paths = 1; +} + +// +message TargetPath { + // + string key = 1; + // + google.protobuf.Any subs = 2; +} + +// +message VegaFrame { + // + FrameOption options = 1; + // + string route_path = 2; + // + google.protobuf.Any body = 3; + // + google.protobuf.Any sub_biz = 4; +}