From 3512adf59d5eb6220f46677f3548698b47dd414b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A4=BE=E4=BC=9A=E6=98=93=E5=A7=90QwQ?= <45892418+SocialSisterYi@users.noreply.github.com> Date: Mon, 12 Jul 2021 16:37:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B9=B6=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A4=A7=E9=87=8F=E3=80=90proto=E5=AE=9A=E4=B9=89=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../bilibili/account/fission/v1/fission.proto | 4 +- grpc_api/bilibili/ad/v1/ad.proto | 287 ++++---- grpc_api/bilibili/api/probe/v1/probe.proto | 2 +- .../bilibili/app/archive/v1/archive.proto | 42 +- grpc_api/bilibili/app/card/v1/card.proto | 20 +- grpc_api/bilibili/app/card/v1/common.proto | 66 +- grpc_api/bilibili/app/card/v1/single.proto | 8 +- .../bilibili/app/interfaces/v1/history.proto | 56 +- .../bilibili/app/interfaces/v1/search.proto | 30 +- .../bilibili/app/playurl/v1/playurl.proto | 412 +++++------- .../bilibili/app/resource/v1/module.proto | 23 +- .../app/show/popular/v1/popular.proto | 38 +- grpc_api/bilibili/app/show/rank/v1/rank.proto | 10 +- .../bilibili/app/show/region/v1/region.proto | 6 +- grpc_api/bilibili/app/space/v1/space.proto | 26 +- grpc_api/bilibili/app/splash/v1/splash.proto | 62 +- grpc_api/bilibili/app/view/v1/view.proto | 466 +++++++------ .../cheese/gateway/player/v1/playurl.proto | 75 +-- .../bilibili/community/service/dm/v1/dm.proto | 258 +++----- .../interfaces/inner-interface/v1/api.proto | 34 + grpc_api/bilibili/im/interfaces/v1.proto | 440 ------------- grpc_api/bilibili/im/interfaces/v1/im.proto | 391 +++++++++++ grpc_api/bilibili/im/type.proto | 244 ------- grpc_api/bilibili/im/type/im.proto | 323 +++++++++ .../main/common/arch/doll/v1/doll.proto | 61 ++ .../main/community/reply/v1/reply.proto | 196 +++--- .../pgc/gateway/player/v1/playurl.proto | 262 ++++++++ grpc_api/bilibili/pgc/gateway/player/v2.proto | 616 ------------------ .../pgc/gateway/player/v2/playurl.proto | 520 +++++++++++++++ .../pgc/service/premiere/v1/premiere.proto | 33 + 31 files changed, 2552 insertions(+), 2461 deletions(-) create mode 100644 grpc_api/bilibili/im/interfaces/inner-interface/v1/api.proto delete mode 100644 grpc_api/bilibili/im/interfaces/v1.proto create mode 100644 grpc_api/bilibili/im/interfaces/v1/im.proto delete mode 100644 grpc_api/bilibili/im/type.proto create mode 100644 grpc_api/bilibili/im/type/im.proto create mode 100644 grpc_api/bilibili/main/common/arch/doll/v1/doll.proto create mode 100644 grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto delete mode 100644 grpc_api/bilibili/pgc/gateway/player/v2.proto create mode 100644 grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto create mode 100644 grpc_api/bilibili/pgc/service/premiere/v1/premiere.proto diff --git a/README.md b/README.md index 967338e..f97d23e 100644 --- a/README.md +++ b/README.md @@ -193,7 +193,7 @@ PS:所有http协议地址均可使用https,文档中为了统一写作`http` - [获取当前时间戳](other/time_stamp.md)√ - [web端组件](web_widget) - [分区当日投稿数](web_widget/zone_upload.md)√ - - [404页漫画收集](web_widget/404_manga.md) + - [404页漫画收集](web_widget/404_manga.md)√ - [APP端组件](APP_widget) - [开屏图片](APP_widget/splash.md)√ - [个性装扮](garb) diff --git a/grpc_api/bilibili/account/fission/v1/fission.proto b/grpc_api/bilibili/account/fission/v1/fission.proto index 6b6d0a4..a4bf5ff 100644 --- a/grpc_api/bilibili/account/fission/v1/fission.proto +++ b/grpc_api/bilibili/account/fission/v1/fission.proto @@ -22,7 +22,7 @@ message EntranceReply { // 活动跳转链接 string url = 3; // 动画效果 - AnimateIcon animateIcon = 4; + AnimateIcon animate_icon = 4; } // 首页弹窗-请求 @@ -36,7 +36,7 @@ message WindowReply { // 跳转链接 string url = 2; // 上报数据字段 - string reportData = 3; + string report_data = 3; } //动画效果 diff --git a/grpc_api/bilibili/ad/v1/ad.proto b/grpc_api/bilibili/ad/v1/ad.proto index 2f30288..78cef7c 100644 --- a/grpc_api/bilibili/ad/v1/ad.proto +++ b/grpc_api/bilibili/ad/v1/ad.proto @@ -7,7 +7,7 @@ import "google/protobuf/wrappers.proto"; // 广告控制 message AdsControlDto { // 视频是否有弹幕,如有,需请求弹幕广告 - int32 hasDanmu = 1; + int32 has_danmu = 1; // 有弹幕的分P视频的cid repeated int64 cids = 2; // 有弹幕的ogv ep @@ -19,54 +19,54 @@ message AdOgvEpDto { // 分集epid int64 epid = 1; // 是否显示 "荐" - bool hasRecommend = 2; + bool has_recommend = 2; } // 广告数据 message SourceContentDto { // 广告请求id - string requestId = 1; + string request_id = 1; // 广告资源位source ID - int32 sourceId = 2; + int32 source_id = 2; // 广告资源位resource ID - int32 resourceId = 3; + int32 resource_id = 3; // 广告位上报标记,对广告返回数据恒为true - bool isAdLoc = 4; + bool is_ad_loc = 4; // 与天马现有逻辑一致, 0有含义 // 0:内容 1:广告 - google.protobuf.Int32Value serverType = 5; + google.protobuf.Int32Value server_type = 5; // 客户端IP回传拼接 - string clientIp = 6; + string client_ip = 6; // 广告卡片位置在一刷中的位置, 天马用, 0有含义 - google.protobuf.Int32Value cardIndex = 7; + google.protobuf.Int32Value card_index = 7; // 广告资源位source 位次 int32 index = 8; // 广告内容 - AdDto adContent = 9; + AdDto ad_content = 9; } // 广告内容 message AdDto { // 广告创意ID - int64 creativeId = 1; + int64 creative_id = 1; // 广告闭环上报回传数据 - string adCb = 2; + string ad_cb = 2; // 额外广告数据 AdContentExtraDto extra = 3; // 广告标记 - int32 cmMark = 4; + int32 cm_mark = 4; // - int64 topViewId = 5; + int64 top_view_id = 5; // - int32 creativeType = 6; + int32 creative_type = 6; // - int32 cardType = 7; + int32 card_type = 7; // - int32 creativeStyle = 8; + int32 creative_style = 8; // - int32 isAd = 9; + int32 is_ad = 9; // - CreativeDto creativeContent = 10; + CreativeDto creative_content = 10; } // 额外广告数据 @@ -74,63 +74,63 @@ message AdContentExtraDto { // 动态布局 string layout = 1; // 展现监控url - repeated string showUrls = 2; + repeated string show_urls = 2; // 点击监控url - repeated string clickUrls = 3; + repeated string click_urls = 3; // 弹幕创意列表展示第三方上报 - repeated string danmuListShowUrls = 4; + repeated string danmu_list_show_urls = 4; // 弹幕创意列表点击第三方上报 - repeated string danmuListClickUrls = 5; + repeated string danmu_list_click_urls = 5; // 弹幕详情页展示第三方上报 - repeated string danmuDetailShowUrls = 6; + repeated string danmu_detail_show_urls = 6; // 弹幕商品添加购物车第三方上报 - repeated string danmuTrolleyAddUrls = 7; + repeated string danmu_trolley_add_urls = 7; // useWebView默认false - bool useAdWebV2 = 8; + bool use_ad_web_v2 = 8; // app唤起白名单 - repeated string openWhitelist = 9; + repeated string open_whitelist = 9; // app下载白名单 - AppPackageDto downloadWhitelist = 10; + AppPackageDto download_whitelist = 10; // 卡片相关信息 AdCardDto card = 11; // 视频播放和弹幕播放上报控制时间 ms - int32 reportTime = 12; + int32 report_time = 12; // 是否优先唤起app store - int32 appstorePriority = 13; + int32 appstore_priority = 13; // 广告售卖类型 - int32 salesType = 14; + int32 sales_type = 14; // 落地页是否预加载 - int32 preloadLandingpage = 15; + int32 preload_landingpage = 15; // 是否需要展示风险行业提示 - bool specialIndustry = 16; + bool special_industry = 16; // 风险行业提示 - string specialIndustryTips = 17; + string special_industry_tips = 17; // 是否展示下载弹框 - bool enableDownloadDialog = 18; + bool enable_download_dialog = 18; // 是否允许分享 - bool enableShare = 19; + bool enable_share = 19; // 个人空间广告入口类型 // 1:橱窗 2:商品店铺 3:小程序 - int32 upzoneEntranceType = 20; + int32 upzone_entrance_type = 20; // 个人空间广告入口上报id,橱窗id(当前用Mid)、店铺id或者小程序id - int32 upzoneEntranceReportId = 21; + int32 upzone_entrance_report_id = 21; // 分享数据 - AdShareInfoDto shareInfo = 22; + AdShareInfoDto share_info = 22; // topview图片链接,闪屏预下载用 - string topviewPicUrl = 23; + string topview_pic_url = 23; // topview视频链接,闪屏预下载用 - string topviewVideoUrl = 24; + string topview_video_url = 24; // 点击区域 // 0:表示banner可点击 1:表示素材可点击 - int32 clickArea = 25; + int32 click_area = 25; // 店铺 - int64 shopId = 26; + int64 shop_id = 26; // up主 - int64 upMid = 27; + int64 up_mid = 27; // 回传id - string trackId = 28; + string track_id = 28; // 商店直投 - int32 enableStoreDirectLaunch = 29; + int32 enable_store_direct_launch = 29; // DPA2.0商品ID int64 product_id = 30; } @@ -142,25 +142,25 @@ message CreativeDto { // string description = 2; // - string imageUrl = 3; + string image_url = 3; // - string imageMd5 = 4; + string image_md5 = 4; // string url = 5; // - string clickUrl = 6; + string click_url = 6; // - string showUrl = 7; + string show_url = 7; // - int64 videoId = 8; + int64 video_id = 8; // - string thumbnailUrl = 9; + string thumbnail_url = 9; // - string thumbnailUrlMd5 = 10; + string thumbnail_url_md5 = 10; // - string logoUrl = 11; + string logo_url = 11; // - string logoMd5 = 12; + string logo_md5 = 12; // string username = 13; } @@ -170,27 +170,27 @@ message AppPackageDto { // 包大小(单位bytes) int64 size = 1; // - string displayName = 2; + string display_name = 2; // - string apkName = 3; + string apk_name = 3; // url string url = 4; // bili schema url - string biliUrl = 5; + string bili_url = 5; // 包md5 string md5 = 6; // 包icon string icon = 7; // 开发者姓名 - string devName = 8; + string dev_name = 8; // 权限地址 - string authUrl = 9; + string auth_url = 9; // 权限名,逗号隔开 - string authName = 10; + string auth_name = 10; // 版本 string version = 11; // 更新时间,yy-mm-hh格式 - string updateTime = 12; + string update_time = 12; // 隐私协议标题 string privacy_name = 13; // 隐私协议url @@ -200,91 +200,91 @@ message AppPackageDto { // 卡片 message AdCardDto { // 卡片类型 - int32 cardType = 1; + int32 card_type = 1; // 标题 string title = 2; // 描述 string desc = 3; // 额外描述 - string extraDesc = 4; + string extra_desc = 4; // 长描述 - string longDesc = 5; + string long_desc = 5; // 短标题, 弹幕广告目录面板标题 - string shortTitle = 6; + string short_title = 6; // 弹幕/浮层广告的弹幕标题 - string danmuTitle = 7; + string danmu_title = 7; // 弹幕/浮层广告的弹幕高度,整型,分母为100 - int32 danmuHeight = 8; + int32 danmu_height = 8; // 弹幕/浮层广告的弹幕宽度,整型,分母为100 - int32 danmuWidth = 9; + int32 danmu_width = 9; // 弹幕/浮层广告生存时间,单位为毫秒 - int32 danmuLife = 10; + int32 danmu_life = 10; // 弹幕/浮层开始时间,单位为毫秒 - int32 danmuBegin = 11; + int32 danmu_begin = 11; // 背景色值(含透明度)如#80FFFFFF - string danmuColor = 12; + string danmu_color = 12; // 弹幕/浮层广告H5落地页 - string danmuH5Url = 13; + string danmu_h5url = 13; // 弹幕/浮层 广告icon - string danmuIcon = 14; + string danmu_icon = 14; // 折叠时间,永驻浮层折叠时间,单位为毫秒 - int32 foldTime = 15; + int32 fold_time = 15; // 广告标文案 - string adTag = 16; + string ad_tag = 16; // cover数组 repeated AdCoverDto covers = 17; // 卡片跳转链接 - string jumpUrl = 18; + string jump_url = 18; // - string imaxLandingPageJsonString = 19; + string imax_landing_page_json_string = 19; // app唤起schema - string callupUrl = 20; + string callup_url = 20; // univeral link域名 - string universalApp = 21; + string universal_app = 21; // 原价, 单位为分 - string oriPrice = 22; + string ori_price = 22; // 现价, 同上 - int32 curPrice = 23; + int32 cur_price = 23; // 券后/现价 价格描述 - string priceDesc = 24; + string price_desc = 24; // 价格单位符号 - string priceSymbol = 25; + string price_symbol = 25; // 券后价格 "1000" - string goodsCurPrice = 26; + string goods_cur_price = 26; // 原价 "¥1002" - string goodsOriPrice = 27; + string goods_ori_price = 27; // 开放平台商品 AdGoodDto good = 28; // 打分? 满分为100 int32 rank = 29; // 热度 - int32 hotScore = 30; + int32 hot_score = 30; // 按钮 AdButtonDto button = 31; // 广告主logo - string adverLogo = 32; + string adver_logo = 32; // 广告主name - string adverName = 33; + string adver_name = 33; // 广告主主页链接 - string adverPageUrl = 34; + string adver_page_url = 34; // 视频弹幕,视频广告用 - repeated string videoBarrage = 35; + repeated string video_barrage = 35; // 商业标信息 - AdBusinessMarkDto adTagStyle = 36; + AdBusinessMarkDto ad_tag_style = 36; // 自动播放视频 AdAutoPlayVideoDto video = 37; // 反馈面板功能模块,屏蔽、投诉、广告介绍 - AdFeedbackPanelDto feedbackPanel = 38; + AdFeedbackPanelDto feedback_panel = 38; // - int64 adverMid = 39; + int64 adver_mid = 39; // - int64 adverAccountId = 40; + int64 adver_account_id = 40; // string duration = 41; // - repeated QualityInfo qualityInfos = 42; + repeated QualityInfo quality_infos = 42; // 动态广告文本 - string dynamicText = 43; + string dynamic_text = 43; // 广告主信息 AdverDto adver = 44; // 评分 @@ -298,7 +298,7 @@ message AdShareInfoDto { // 分享副标题 string subtitle = 2; // 分享图片url - string imageUrl = 3; + string image_url = 3; } // 广告卡片封面数据 @@ -309,13 +309,13 @@ message AdCoverDto { // 0:无限循环 int32 loop = 2; // 图片点击跳转地址,截至目前为空 - string jumpUrl = 3; + string jump_url = 3; // 跳转监测链接, 数组,单个图片的监控,出区别于click_urls,应前端要求。(此字段截至目前为空,使用时需再次确认) - repeated string reportUrls = 4; + repeated string report_urls = 4; // 图片高度 - int32 imageHeight = 5; + int32 image_height = 5; // 图片宽度 - int32 imageWidth = 6; + int32 image_width = 6; } // 按钮 @@ -326,11 +326,11 @@ message AdButtonDto { // 按钮文案 string text = 2; // 按钮跳转地址 - string jumpUrl = 3; + string jump_url = 3; // 跳转监测链接 - string reportUrls = 4; + string report_urls = 4; // 唤起schema - string dlsucCallupUrl = 5; + string dlsuc_callup_url = 5; //游戏id int32 game_id = 6; //游戏监控字段 @@ -345,28 +345,27 @@ message AdBusinessMarkDto { // 商业标文案 string text = 2; // 商业标文案颜色,如#80FFFFFF RGBA - string textColor = 3; + string text_color = 3; // 夜间模式文字色 - string textColorNight = 4; + string text_color_night = 4; // 背景色 - string bgColor = 5; + string bg_color = 5; // 夜间模式背景色 - string bgColorNight = 6; + string bg_color_night = 6; // 边框色 - string borderColor = 7; + string border_color = 7; // 夜间模式边框色 - string borderColorNight = 8; + string border_color_night = 8; // 图片商业标 - string imgUrl = 9; + string img_url = 9; // 图片高度 - int32 imgHeight = 10; + int32 img_height = 10; // 图片宽度 - int32 imgWidth = 11; + int32 img_width = 11; // - string bgBorderColor = 12; + string bg_border_color = 12; } - // 自动播放视频 message AdAutoPlayVideoDto { // avid @@ -382,19 +381,19 @@ message AdAutoPlayVideoDto { // 是否自动播放 string cover = 6; // 是否自动播放 - bool autoPlay = 7; + bool auto_play = 7; // 按钮是否动态变色 - bool btnDycColor = 8; + bool btn_dyc_color = 8; // 按钮动态变色时间 ms - int32 btnDycTime = 9; + int32 btn_dyc_time = 9; // 用于做联播是否是同一个视频的id - int64 bizId = 10; + int64 biz_id = 10; // 开始播放三方监控 - repeated string process0Urls = 11; + repeated string process0_urls = 11; // 播放3S三方监控 - repeated string play3SUrls = 12; + repeated string play_3s_urls = 12; // 播放5S三方监控 - repeated string play5SUrls = 13; + repeated string play_5s_urls = 13; // 横竖屏 int32 orientation = 14; } @@ -402,32 +401,32 @@ message AdAutoPlayVideoDto { // 反馈面板功能模块 message AdFeedbackPanelDto { // 面板类型,广告、推广 - string panelTypeText = 1; + string panel_type_text = 1; // 反馈面版信息 - repeated AdFeedbackPanelModuleDto feedbackPanelDetail = 2; + repeated AdFeedbackPanelModuleDto feedback_panel_detail = 2; } // 反馈面版信息 message AdFeedbackPanelModuleDto { // 模块id - int32 moduleId = 1; + int32 module_id = 1; // icon url - string iconUrl = 2; + string icon_url = 2; // 跳转类型 // 1:气泡 2:H5 - int32 jumpType = 3; + int32 jump_type = 3; // 跳转地址 - string jumpUrl = 4; + string jump_url = 4; // 文案 string text = 5; // 二级文案数组 - repeated AdSecondFeedbackPanelDto secondaryPanel = 6; + repeated AdSecondFeedbackPanelDto secondary_panel = 6; } // 二级文案 message AdSecondFeedbackPanelDto { // 屏蔽理由id - int32 reasonId = 1; + int32 reason_id = 1; // 理由文案 string text = 2; } @@ -435,13 +434,13 @@ message AdSecondFeedbackPanelDto { // 开放平台商品 message AdGoodDto { // 电商商品ID - int64 itemId = 1; + int64 item_id = 1; // 电商SKU ID - int64 skuId = 2; + int64 sku_id = 2; // 店铺ID - int64 shopId = 3; + int64 shop_id = 3; // SKU库存 - int64 skuNum = 4; + int64 sku_num = 4; } // @@ -450,20 +449,26 @@ message QualityInfo { string icon = 1; // string text = 2; + // + bool is_bg = 3; + // + string bg_color = 4; + // + string bg_color_night = 5; } // 广告主信息 message AdverDto { // - int64 adverId = 1; + int64 adver_id = 1; // - string adverLogo = 2; + string adver_logo = 2; // - string adverName = 3; + string adver_name = 3; // - int32 adverType = 4; + int32 adver_type = 4; // - string adverPageUrl = 5; + string adver_page_url = 5; // - string adverDesc = 6; + string adver_desc = 6; } diff --git a/grpc_api/bilibili/api/probe/v1/probe.proto b/grpc_api/bilibili/api/probe/v1/probe.proto index edfeae0..69223a8 100644 --- a/grpc_api/bilibili/api/probe/v1/probe.proto +++ b/grpc_api/bilibili/api/probe/v1/probe.proto @@ -66,5 +66,5 @@ message ProbeSubReq { // message ProbeSubReply { // - int64 messageId = 1; + int64 message_id = 1; } \ No newline at end of file diff --git a/grpc_api/bilibili/app/archive/v1/archive.proto b/grpc_api/bilibili/app/archive/v1/archive.proto index 22f25a4..c661f7a 100644 --- a/grpc_api/bilibili/app/archive/v1/archive.proto +++ b/grpc_api/bilibili/app/archive/v1/archive.proto @@ -9,9 +9,9 @@ message Arc{ // 稿件分P数 int64 videos = 2; // 分区id - int32 typeId = 3; + int32 type_id = 3; // 二级分区名 - string typeName = 4; + string type_name = 4; // 稿件类型 // 1:原创 2:转载 int32 copyright = 5; @@ -32,19 +32,19 @@ message Arc{ int32 access = 12; // 属性位配置(现在无了) int32 attribute = 13; - // + // 空 string tag = 14; - // + // 空 repeated string tags = 15; // 稿件总时长(单位为秒) int64 duration = 16; // 参与的活动id - int64 missionId = 17; + int64 mission_id = 17; // 绑定的商单id - int64 orderId = 18; + int64 order_id = 18; // PGC稿件强制重定向url(如番剧、影视) - string redirectUrl = 19; - // + string redirect_url = 19; + // 空 int64 forward = 20; // 控制标志 Rights rights = 21; @@ -52,20 +52,20 @@ message Arc{ Author author = 22; // 状态数 Stat stat = 23; - // - string reportResult = 24; + // 空 + string report_result = 24; // 投稿时发送的动态内容 string dynamic = 25; // 稿件1P cid - int64 firstCid = 26; + int64 first_cid = 26; // 稿件1P 分辨率 Dimension dimension = 27; // 合作组成员列表 - repeated StaffInfo staffInfo = 28; + repeated StaffInfo staff_info = 28; // UGC合集id - int64 seasonId = 29; + int64 season_id = 29; // 新版属性位配置(也没用) - int64 attributeV2 = 30; + int64 attribute_v2 = 30; } // UP主信息 @@ -127,17 +127,17 @@ message Rights{ // 是否高码率 int32 hd5 = 6; // 是否禁止转载标志 - int32 noReprint = 7; + int32 no_reprint = 7; // 是否允许自动播放 int32 autoplay = 8; // UGC稿件需要付费 - int32 ugcPay = 9; + int32 ugc_pay = 9; // 是否联合投稿 - int32 isCooperation = 10; + int32 is_cooperation = 10; // 是否UGC付费预览 - int32 ugcPayPreview = 11; + int32 ugc_pay_preview = 11; // 是否禁止后台播放 - int32 noBackground = 12; + int32 no_background = 12; } // 合作成员信息 @@ -168,9 +168,9 @@ message Stat{ // 分享数 int32 share = 7; // 当前排名 - int32 nowRank = 8; + int32 now_rank = 8; // 历史最高排名 - int32 hisRank = 9; + int32 his_rank = 9; // 点赞数 int32 like = 10; // 点踩数(前端不可见故恒为0) diff --git a/grpc_api/bilibili/app/card/v1/card.proto b/grpc_api/bilibili/app/card/v1/card.proto index 87cdec8..949ab10 100644 --- a/grpc_api/bilibili/app/card/v1/card.proto +++ b/grpc_api/bilibili/app/card/v1/card.proto @@ -8,24 +8,24 @@ import "bilibili/app/card/v1/single.proto"; message Card { oneof item { // 小封面条目 - SmallCoverV5 smallCoverV5 = 1; + SmallCoverV5 small_cover_v5 = 1; // - LargeCoverV1 largeCoverV1 = 2; + LargeCoverV1 large_cover_v1 = 2; // - ThreeItemAllV2 threeItemAllV2 = 3; + ThreeItemAllV2 three_item_all_v2 = 3; // - ThreeItemV1 threeItemV1 = 4; + ThreeItemV1 three_item_v1 = 4; // - HotTopic hotTopic = 5; + HotTopic hot_topic = 5; // - DynamicHot dynamicHot = 6; + DynamicHot three_item_h_v5 = 6; // - MiddleCoverV3 middleCoverV3 = 7; + MiddleCoverV3 middle_cover_v3 = 7; // - LargeCoverV4 largeCoverV4 = 8; + LargeCoverV4 large_cover_v4 = 8; // 热门列表顶部按钮 - PopularTopEntrance popularTopEntrance = 9; + PopularTopEntrance popular_top_entrance = 9; // - RcmdOneItem rcmdOneItem = 10; + RcmdOneItem rcmd_one_item = 10; } } diff --git a/grpc_api/bilibili/app/card/v1/common.proto b/grpc_api/bilibili/app/card/v1/common.proto index 2795f3e..eaa5c35 100644 --- a/grpc_api/bilibili/app/card/v1/common.proto +++ b/grpc_api/bilibili/app/card/v1/common.proto @@ -7,9 +7,9 @@ import "bilibili/app/card/v1/ad.proto"; // 条目基本信息 message Base { // 卡片类型 - string cardType = 1; + string card_type = 1; // 卡片跳转类型? - string cardGoto = 2; + string card_goto = 2; // 跳转类型 // av:视频稿件 mid:用户空间 string goto = 3; @@ -22,28 +22,28 @@ message Base { // 跳转uri string uri = 7; // - ThreePoint threePoint = 8; + ThreePoint three_point = 8; // Args args = 9; // - PlayerArgs playerArgs = 10; + PlayerArgs player_args = 10; // 条目排位序号 int64 idx = 11; // - AdInfo adInfo = 12; + AdInfo ad_info = 12; // Mask mask = 13; //来源标识 // recommend:推荐 operation:管理? - string fromType = 14; + string from_type = 14; // - repeated ThreePointV2 threePointV2 = 15; + repeated ThreePointV2 three_point_v2 = 15; // - repeated ThreePointV3 threePointV3 = 16; + repeated ThreePointV3 three_point_v3 = 16; // - Button descButton = 17; + Button desc_button = 17; // 三点v4 - ThreePointV4 threePointV4 = 18; + ThreePointV4 three_point_v4 = 18; } // 按钮信息 @@ -61,7 +61,7 @@ message Button { // 类型 int32 type = 6; // 事件v2 - string eventV2 = 7; + string event_v2 = 7; // 关系信息 Relation relation = 8; } @@ -69,11 +69,11 @@ message Button { // message ThreePoint { // - repeated DislikeReason dislikeReasons = 1; + repeated DislikeReason dislike_reasons = 1; // repeated DislikeReason feedbacks = 2; //稍后再看 - int32 watchLater = 3; + int32 watch_later = 3; } // @@ -213,7 +213,7 @@ message SharePlane { // 标题 string title = 1; // 副标贴文案 - string shareSubtitle = 2; + string share_subtitle = 2; // 备注 string desc = 3; // 封面url @@ -223,15 +223,15 @@ message SharePlane { // 稿件bvid string bvid = 6; // 允许分享方式 - map shareTo = 7; + map share_to = 7; // UP主昵称 string author = 8; // UP主mid - int64 authorId = 9; + int64 author_id = 9; // 短连接 - string shortLink = 10; + string short_link = 10; // 播放次数文案 - string playNumber = 11; + string play_number = 11; } // 稍后再看信息 @@ -247,36 +247,36 @@ message ReasonStyle { // 文案 string text = 1; // 文字颜色 - string textColor = 2; + string text_color = 2; // 背景色 - string bgColor = 3; + string bg_color = 3; // 边框色 - string borderColor = 4; + string border_color = 4; // 图标url - string iconUrl = 5; + string icon_url = 5; // 文字颜色-夜间 - string textColorNight = 6; + string text_color_night = 6; // 背景色-夜间 - string bgColorNight = 7; + string bg_color_night = 7; // 边框色-夜间 - string borderColorNight = 8; + string border_color_night = 8; // 图标url-夜间 - string iconNightUrl = 9; + string icon_night_url = 9; // 背景风格id // 1:无背景 2:有背景 - int32 bgStyle = 10; + int32 bg_style = 10; // string uri = 11; // - string iconBgUrl = 12; + string icon_bg_url = 12; // string event = 13; // - string eventV2 = 14; + string event_v2 = 14; // - int32 rightIconType = 15; + int32 right_icon_type = 15; // - string leftIconType = 16; + string left_icon_type = 16; } // @@ -318,7 +318,7 @@ message Relation { // 关系状态 int32 status = 1; // 是否关注 - int32 isFollow = 2; + int32 is_follow = 2; // 是否粉丝 - int32 isFollowed = 3; + int32 is_followed = 3; } diff --git a/grpc_api/bilibili/app/card/v1/single.proto b/grpc_api/bilibili/app/card/v1/single.proto index 24ad90a..bc7a984 100644 --- a/grpc_api/bilibili/app/card/v1/single.proto +++ b/grpc_api/bilibili/app/card/v1/single.proto @@ -290,22 +290,22 @@ message EntranceItem { // 标题 string title = 3; // 入口模块id - string moduleId = 4; + string module_id = 4; // 跳转uri string uri = 5; // 入口id - int64 entranceId = 6; + int64 entrance_id = 6; // 气泡信息 Bubble bubble = 7; // 入口类型 // 1:代表分品类热门 - int32 entranceType = 8; + int32 entrance_type = 8; } // 气泡信息 message Bubble { // 文案 - string bubbleContent = 1; + string bubble_content = 1; // 版本 int32 version = 2; // 起始时间 diff --git a/grpc_api/bilibili/app/interfaces/v1/history.proto b/grpc_api/bilibili/app/interfaces/v1/history.proto index 2fd08ad..e710ed4 100644 --- a/grpc_api/bilibili/app/interfaces/v1/history.proto +++ b/grpc_api/bilibili/app/interfaces/v1/history.proto @@ -55,7 +55,7 @@ message CursorReq { // all:全部 archive:视频 live:直播 article:专栏 string business = 2; // 秒开参数(旧版) - PlayerPreloadParams playerPreload = 3; + PlayerPreloadParams player_preload = 3; // 秒开参数 bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4; } @@ -80,7 +80,7 @@ message CursorV2Req { // archive:视频 live:直播 article:专栏 goods:商品 show:展演 string business = 2; // 秒开参数(旧版) - PlayerPreloadParams playerPreload = 3; + PlayerPreloadParams player_preload = 3; // 秒开参数 bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4; // 是否选择本机的播放历史 @@ -102,15 +102,15 @@ message CursorItem { // 主体数据 oneof card_item { // ugc稿件 - CardUGC cardUGC = 1; + CardUGC card_ugc = 1; // pgc稿件 - CardOGV cardOGV = 2; + CardOGV card_ogv = 2; // 专栏 - CardArticle cardArticle = 3; + CardArticle card_article = 3; // 直播 - CardLive cardLive = 4; + CardLive card_live = 4; // 课程 - CardCheese cardCheese = 5; + CardCheese card_cheese = 5; } // 标题 string title = 6; @@ -130,7 +130,7 @@ message CursorItem { // 设备标识 DeviceType dt = 13; // 是否有分享按钮 - bool hasShare = 14; + bool has_share = 14; } // ugc稿件卡片 @@ -146,7 +146,7 @@ message CardUGC { // UP主mid int64 mid = 5; // 是否展示关注按钮 - bool displayAttention = 6; + bool display_attention = 6; // 历史观看视频cid int64 cid = 7; // 历史观看视频分P @@ -160,9 +160,9 @@ message CardUGC { // 总分P数 int64 videos = 12; // 短链接 - string shortLink = 13; + string short_link = 13; // 分享副标题 - string shareSubtitle = 14; + string share_subtitle = 14; // 播放数 int64 view = 15; } @@ -208,7 +208,7 @@ message CardLive { // 直播状态 int32 ststus = 5; // 是否展示关注按钮 - bool displayAttention = 6; + bool display_attention = 6; // 关系信息 Relation relation = 7; } @@ -248,7 +248,7 @@ message Cursor { // 删除历史记录-请求 message DeleteReq { // 历史记录信息 - HisInfo hisInfo = 1; + HisInfo his_info = 1; } // 历史记录信息 @@ -273,22 +273,14 @@ message DeviceType { //设备标识代码 enum DT { - // 未知 - Un known = 0; - //手机端 - Phone = 1; - // ipad端 - Pad = 2; - // web端 - PC = 3; - // TV端 - TV = 4; - // - Car = 5; - // - Iot = 6; - // apad端 - AndPad = 7; + Unknown = 0; // 未知 + Phone = 1; // 手机端 + Pad = 2; // ipad端 + PC = 3; // web端 + TV = 4; // TV端 + Car = 5; // + Iot = 6; // + AndPad = 7; // apad端 } // 关系信息 @@ -297,9 +289,9 @@ message Relation { // 1:未关注 2:已关注 3:被关注 4:互关 int32 status = 1; // 用户关注UP主 - int32 isFollow = 2; + int32 is_follow = 2; // UP主关注用户 - int32 isFollowed = 3; + int32 is_followed = 3; } // 搜索历史记录-请求 @@ -358,7 +350,7 @@ message LatestHistoryReq { // archive:视频 live:直播 article:专栏 goods:商品 show:展演 string business = 1; // 秒开参数 - PlayerPreloadParams playerPreload = 2; + PlayerPreloadParams player_preload = 2; } // 获取最新的历史记录-响应 diff --git a/grpc_api/bilibili/app/interfaces/v1/search.proto b/grpc_api/bilibili/app/interfaces/v1/search.proto index 10b627d..8ad82d8 100644 --- a/grpc_api/bilibili/app/interfaces/v1/search.proto +++ b/grpc_api/bilibili/app/interfaces/v1/search.proto @@ -17,7 +17,7 @@ message SuggestionResult3Req { int32 highlight = 2; // 是否青少年模式 // 1:开启青少年模式 - int32 teenagersMode = 3; + int32 teenagers_mode = 3; } // 获取搜索建议-响应 @@ -43,17 +43,17 @@ message ResultItem { // 图片 string cover = 5; // 图片尺寸 - double coverSize = 6; + double cover_size = 6; // sug词类型 - string sugType = 7; + string sug_type = 7; // 词条大类型 - int32 termType = 8; + int32 term_type = 8; // 跳转类型 string goto = 9; // 跳转uri string uri = 10; // 认证信息 - OfficialVerify officialVerify = 11; + OfficialVerify official_verify = 11; // 跳转参数 string param = 12; // up主mid @@ -67,7 +67,7 @@ message ResultItem { // 投稿时间 int64 ptime = 17; // season类型名称 - string seasonTypeName = 18; + string season_type_name = 18; // 地区 string area = 19; // 作品风格 @@ -83,9 +83,9 @@ message ResultItem { // string styles = 25; // - int64 moduleId = 26; + int64 module_id = 26; // - string liveLink = 27; + string live_link = 27; } // 认证信息 @@ -102,18 +102,18 @@ message ReasonStyle { // 角标文案 string text = 1; // 文案日间色值 - string textColor = 2; + string text_color = 2; // 文案夜间色值 - string textColorNight = 3; + string text_color_night = 3; // 背景日间色值 - string bgColor = 4; + string bg_color = 4; // 背景夜间色值 - string bgColorNight = 5; + string bg_color_night = 5; // 边框日间色值 - string borderColor = 6; + string border_color = 6; // 边框夜间色值 - string borderColorNight = 7; + string border_color_night = 7; // 角标样式 // 1:填充模式 2:镂空模式 - int32 bgStyle = 8; + int32 bg_style = 8; } diff --git a/grpc_api/bilibili/app/playurl/v1/playurl.proto b/grpc_api/bilibili/app/playurl/v1/playurl.proto index cf25351..66a8384 100644 --- a/grpc_api/bilibili/app/playurl/v1/playurl.proto +++ b/grpc_api/bilibili/app/playurl/v1/playurl.proto @@ -51,23 +51,23 @@ message PlayURLReply { // 总时长(单位为ms) uint64 timelength = 3; // 编码id - uint32 videoCodecid = 4; + uint32 video_codecid = 4; // 视频流版本 uint32 fnver = 5; // 视频流格式 uint32 fnval = 6; // 是否支持投影 - bool videoProject = 7; + bool video_project = 7; // 分段视频流列表 repeated ResponseUrl durl = 8; // dash数据 ResponseDash dash = 9; // 是否非全二压 - int32 noRexcode = 10; + int32 no_rexcode = 10; // 互动视频升级提示 - UpgradeLimit upgradeLimit = 11; + UpgradeLimit upgrade_limit = 11; // 清晰度描述列表 - repeated FormatDescription supportFormats = 12; + repeated FormatDescription support_formats = 12; // 视频格式 VideoType type = 13; } @@ -83,7 +83,7 @@ message ResponseUrl { // 主线流 string url = 4; // 备用流 - repeated string backupUrl = 5; + repeated string backup_url = 5; // md5 string md5 = 6; } @@ -99,19 +99,21 @@ message ResponseDash { // dash条目 message DashItem { // 清晰度 - uint32 id=1; + uint32 id = 1; // 主线流 - string baseUrl=2; + string baseUrl = 2; // 备用流 - repeated string backupUrl=3; + repeated string backup_url = 3; // 带宽 - uint32 bandwidth=4; + uint32 bandwidth = 4; // 编码id - uint32 codecid=5; + uint32 codecid = 5; // md5 - string md5=6; + string md5 = 6; // 大小 - uint64 size=7; + uint64 size = 7; + // 帧率 + string frame_rate = 8; } // 互动视频升级提示 @@ -143,14 +145,14 @@ message FormatDescription { // 清晰度描述 string description = 3; // 新描述 - string newDescription = 4; + string new_description = 4; // 选中态的清晰度描述 - string displayDesc = 5; + string display_desc = 5; // 选中态的清晰度描述的角标 string superscript = 6; } -// 投屏地址请求 +// 投屏地址-请求 message ProjectReq { // 稿件avid int64 aid = 1; @@ -167,13 +169,13 @@ message ProjectReq { uint32 download = 6; // 流url强制是用域名 // 0:允许使用ip 1:使用http 2:使用https - int32 forceHost = 7; + int32 force_host = 7; // 是否4K bool fourk = 8; // 当前页spm string spmid = 9; // 上一页spm - string fromSpmid = 10; + string from_spmid = 10; // 使用协议 // 0:默认乐播 1:自建协议 2:云投屏 3:airplay int32 protocol = 11; @@ -204,51 +206,46 @@ message PlayViewReq { uint32 download = 6; // 流url强制是用域名 // 0:允许使用ip 1:使用http 2:使用https - int32 forceHost = 7; + int32 force_host = 7; // 是否4K bool fourk = 8; // 当前页spm string spmid = 9; // 上一页spm - string fromSpmid = 10; + string from_spmid = 10; // 青少年模式 - int32 teenagersMode = 11; + int32 teenagers_mode = 11; // 编码 - CodeType preferCodecType = 12; + CodeType prefer_codec_type = 12; // 业务类型 Business business = 13; } // 业务类型 enum Business { - // 未知类型 - UNKNOWN = 0; - // story业务 - STORY = 1; + UNKNOWN = 0; // 未知类型 + STORY = 1; // story业务 } // 编码类型 enum CodeType { - // 默认 - NOCODE = 0; - // H.264 - CODE264 = 1; - // H.265 - CODE265 = 2; + NOCODE = 0; // 默认 + CODE264 = 1; // H.264 + CODE265 = 2; // H.265 } // 播放页信息-回复 message PlayViewReply { // 视频流信息 - VideoInfo info = 1; + VideoInfo video_info = 1; // 播放控件用户自定义配置 - PlayAbilityConf PlayConf = 2; + PlayAbilityConf play_conf = 2; // 互动视频升级提示 - UpgradeLimit upgradeLimit = 3; + UpgradeLimit upgrade_limit = 3; // Chronos灰度管理 Chronos chronos = 4; // 播放控件稿件配置 - PlayArcConf playArc = 5; + PlayArcConf play_arc = 5; // 事件 Event event = 6; } @@ -279,189 +276,104 @@ message PlayConfReq {} // 获取播放界面配置-响应 message PlayConfReply { //播放控件用户自定义配置 - PlayAbilityConf playConf = 1; + PlayAbilityConf play_conf = 1; } // 禁用功能配置 message PlayAbilityConf { - // 后台播放 - CloudConf backgroundPlayDisable = 1; - // 镜像反转 - CloudConf flipDisable = 2; - // 投屏 - CloudConf castDisable = 3; - // 反馈 - CloudConf feedbackDisable = 4; - // 字幕 - CloudConf subtitleDisable = 5; - // 播放速度 - CloudConf playbackRateDisable = 6; - // 定时停止 - CloudConf timeUpDisable = 7; - // 播放方式 - CloudConf playbackModeDisable = 8; - // 画面尺寸 - CloudConf scaleModeDisable = 9; - // 赞 - CloudConf likeDisable = 10; - // 踩 - CloudConf dislikeDisable = 11; - // 投币 - CloudConf coinDisable = 12; - // 充电 - CloudConf elecDisable = 13; - // 分享 - CloudConf shareDisable = 14; - // 截图 - CloudConf screenShotDisable = 15; - // 锁定 - CloudConf lockScreenDisable = 16; - // 相关推荐 - CloudConf recommendDisable = 17; - // 播放速度 - CloudConf playbackSpeedDisable = 18; - // 清晰度 - CloudConf definitionDisable = 19; - // 选集 - CloudConf selectionsDisable = 20; - // 下一集 - CloudConf nextDisable = 21; - // 编辑弹幕 - CloudConf editDmDisable = 22; - // 小窗 - CloudConf smallWindowDisable = 23; - // 震动 - CloudConf shakeDisable = 24; - // 外层面板弹幕设置 - CloudConf outerDmDisable = 25; - // 三点内弹幕设置 - CloudConf innerDmDisable = 26; - // 一起看入口 - CloudConf freyaEnterDisable = 27; - // 杜比音效 - CloudConf dolbyDisable = 28; + CloudConf background_play_conf = 1; // 后台播放 + CloudConf flip_conf = 2; // 镜像反转 + CloudConf cast_conf = 3; // 投屏 + CloudConf feedback_conf = 4; // 反馈 + CloudConf subtitle_conf = 5; // 字幕 + CloudConf playback_rate_conf = 6; // 播放速度 + CloudConf time_up_conf = 7; // 定时停止 + CloudConf playback_mode_conf = 8; // 播放方式 + CloudConf scale_mode_conf = 9; // 画面尺寸 + CloudConf like_conf = 10; // 赞 + CloudConf dislike_conf = 11; // 踩 + CloudConf coin_conf = 12; // 投币 + CloudConf elec_conf = 13; // 充电 + CloudConf share_conf = 14; // 分享 + CloudConf screen_shot_conf = 15; // 截图 + CloudConf lock_screen_conf = 16; // 锁定 + CloudConf recommend_conf = 17; // 相关推荐 + CloudConf playback_speed_conf = 18; // 播放速度 + CloudConf definition_conf = 19; // 清晰度 + CloudConf selections_conf = 20; // 选集 + CloudConf next_conf = 21; // 下一集 + CloudConf edit_dm_conf = 22; // 编辑弹幕 + CloudConf small_window_conf = 23; // 小窗 + CloudConf shake_conf = 24; // 震动 + CloudConf outer_dm_conf = 25; // 外层面板弹幕设置 + CloudConf innerDmDisable = 26; // 三点内弹幕设置 + CloudConf inner_dm_conf = 27; // 一起看入口 + CloudConf dolby_conf = 28; // 杜比音效 } // 播放控件稿件配置 message PlayArcConf { - // 后台播放 - ArcConf backgroundPlayConf = 1; - // 镜像反转 - ArcConf flipConf = 2; - // 投屏 - ArcConf castConf = 3; - // 反馈 - ArcConf feedbackConf = 4; - // 字幕 - ArcConf subtitleConf = 5; - // 播放速度 - ArcConf playbackRateConf = 6; - // 定时停止 - ArcConf timeUpConf = 7; - // 播放方式 - ArcConf playbackModeConf = 8; - // 画面尺寸 - ArcConf scaleModeConf = 9; - // 赞 - ArcConf likeConf = 10; - // 踩 - ArcConf dislikeConf = 11; - // 投币 - ArcConf coinConf = 12; - // 充电 - ArcConf elecConf = 13; - // 分享 - ArcConf shareConf = 14; - // 截图 - ArcConf screenShotConf = 15; - // 锁定 - ArcConf lockScreenConf = 16; - // 相关推荐 - ArcConf recommendConf = 17; - // 播放速度 - ArcConf playbackSpeedConf = 18; - // 清晰度 - ArcConf definitionConf = 19; - // 选集 - ArcConf selectionsConf = 20; - // 下一集 - ArcConf nextConf = 21; - // 编辑弹幕 - ArcConf editDmConf = 22; - // 小窗 - ArcConf smallWindowConf = 23; - // 震动 - ArcConf shakeConf = 24; - // 外层面板弹幕设置 - ArcConf outerDmConf = 25; - // 三点内弹幕设置 - ArcConf innerDmConf = 26; - // 一起看入口 - ArcConf freyaEnterConf = 27; - // 杜比音效 - ArcConf dolbyConf = 28; + ArcConf background_play_conf = 1; // 后台播放 + ArcConf flip_conf = 2; // 镜像反转 + ArcConf cast_conf = 3; // 投屏 + ArcConf feedback_conf = 4; // 反馈 + ArcConf subtitle_conf = 5; // 字幕 + ArcConf playback_rate_conf = 6; // 播放速度 + ArcConf time_up_conf = 7; // 定时停止 + ArcConf playback_mode_conf = 8; // 播放方式 + ArcConf scale_mode_conf = 9; // 画面尺寸 + ArcConf like_conf = 10; // 赞 + ArcConf dislike_conf = 11; // 踩 + ArcConf coin_conf = 12; // 投币 + ArcConf elec_conf = 13; // 充电 + ArcConf share_conf = 14; // 分享 + ArcConf screen_shot_conf = 15; // 截图 + ArcConf lock_screen_conf = 16; // 锁定 + ArcConf recommend_conf = 17; // 相关推荐 + ArcConf playback_speed_conf = 18; // 播放速度 + ArcConf definition_conf = 19; // 清晰度 + ArcConf selections_conf = 20; // 选集 + ArcConf next_conf = 21; // 下一集 + ArcConf edit_dm_conf = 22; // 编辑弹幕 + ArcConf small_window_conf = 23; // 小窗 + ArcConf shake_conf = 24; // 震动 + ArcConf outer_dm_conf = 25; // 外层面板弹幕设置 + ArcConf inner_dm_conf = 26; // 三点内弹幕设置 + ArcConf panorama_conf = 27; // 一起看入口 + ArcConf dolby_conf = 28; // 杜比音效 } // 设置类型 enum ConfType { - // - NoType = 0; - // 镜像反转 - FLIPCONF = 1; - // 视频投屏 - CASTCONF = 2; - // 反馈 - FEEDBACK = 3; - // 字幕 - SUBTITLE = 4; - // 播放速度 - PLAYBACKRATE = 5; - // 定时停止播放 - TIMEUP = 6; - // 播放方式 - PLAYBACKMODE = 7; - // 画面尺寸 - SCALEMODE = 8; - // 后台播放 - BACKGROUNDPLAY = 9; - // 顶 - LIKE = 10; - // 踩 - DISLIKE = 11; - // 投币 - COIN = 12; - // 充电 - ELEC = 13; - // 分享 - SHARE = 14; - // 截图 - SCREENSHOT = 15; - // 锁屏 - LOCKSCREEN = 16; - // 倍速 - RECOMMEND = 17; - // 清晰度 - PLAYBACKSPEED = 18; - // 选集 - DEFINITION = 19; - // 下一集 - SELECTIONS = 20; - // 编辑弹幕 - NEXT = 21; - // 小窗 - EDITDM = 22; - // 播放震动 - SMALLWINDOW = 23; - // 外层面板弹幕设置 - SHAKE = 24; - // 三点内弹幕设置 - OUTERDM = 25; - // 三点内弹幕设置 - INNERDM = 26; - // 全景 - PANORAMA = 27; - // 杜比 - DOLBY = 28; + NoType = 0; // + FLIPCONF = 1; // 镜像反转 + CASTCONF = 2; // 视频投屏 + FEEDBACK = 3; // 反馈 + SUBTITLE = 4; // 字幕 + PLAYBACKRATE = 5; // 播放速度 + TIMEUP = 6; // 定时停止播放 + PLAYBACKMODE = 7; // 播放方式 + SCALEMODE = 8; // 画面尺寸 + BACKGROUNDPLAY = 9; // 后台播放 + LIKE = 10; // 顶 + DISLIKE = 11; // 踩 + COIN = 12; // 投币 + ELEC = 13; // 充电 + SHARE = 14; // 分享 + SCREENSHOT = 15; // 截图 + LOCKSCREEN = 16; // 锁屏 + RECOMMEND = 17; // 推荐 + PLAYBACKSPEED = 18; // 倍速 + DEFINITION = 19; // 清晰度 + SELECTIONS = 20; // 选集 + NEXT = 21; // 下一集 + EDITDM = 22; // 编辑弹幕 + SMALLWINDOW = 23; // 小窗 + SHAKE = 24; // 播放震动 + OUTERDM = 25; // 外层面板弹幕设置 + INNERDM = 26; // 三点内弹幕设置 + PANORAMA = 27; // 全景 + DOLBY = 28; // 杜比 } // @@ -469,9 +381,9 @@ message CloudConf { // 是否展示功能 bool show = 1; // 设置类型 - ConfType confType = 2; + ConfType conf_type = 2; // - FieldValue fieldValue = 3; + FieldValue field_value = 3; } // 配置字段值 @@ -486,36 +398,33 @@ message FieldValue { // 配置项 message ArcConf { // 是否支持 - bool isSupport = 1; + bool is_support = 1; } // 视频url信息 message VideoInfo { // 视频清晰度 - uint32 quality=1; + uint32 quality = 1; // 视频格式 - string format=2; + string format = 2; // 视频时长 - uint64 timelength=3; + uint64 timelength = 3; // 视频编码id - uint32 videoCodecid=4; + uint32 video_codecid = 4; // 视频流 - repeated Stream streamList=5; + repeated Stream stream_list = 5; // 伴音流 - repeated DashItem audio=6; + repeated DashItem dash_audio = 6; // 杜比伴音流 - DolbyItem dolby=7; + DolbyItem dolby = 7; } -//杜比音频信息 +// 杜比音频信息 message DolbyItem { enum Type { - // NONE - NONE = 0; - // 普通杜比音效 - COMMON = 1; - // 全景杜比音效 - ATMOS = 2; + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 } // 杜比类型 Type type = 1; @@ -526,13 +435,13 @@ message DolbyItem { // 视频流信息 message Stream { // 元数据 - StreamInfo info = 1; + StreamInfo stream_info = 1; // 流数据 - oneof contentCase { + oneof content { // dash流 - DashVideo dashvideo = 2; + DashVideo dash_video = 2; // 分段流 - SegmentVideo segmentvideo = 3; + SegmentVideo segment_video = 3; } } @@ -544,10 +453,8 @@ message SegmentVideo { // 错误码 enum PlayErr { - // - NoErr_VALUE = 0; - // 管控类型的错误码 - WithMultiDeviceLoginErr_VALUE = 1; + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 } // 流媒体元数据 @@ -559,23 +466,23 @@ message StreamInfo { // 格式描述 string description = 3; // 错误码 - uint32 errCode = 4; + uint32 err_code = 4; // 不满足条件信息 StreamLimit limit = 5; // 是否需要vip - bool needVip = 6; + bool need_vip = 6; // 是否需要登录 - bool needLogin = 7; + bool need_login = 7; // 是否完整 bool intact = 8; // 是否非全二压 - bool noRexcode = 9; + bool no_rexcode = 9; // 清晰度属性位 int64 attribute = 10; // 新版格式描述 - string newDescription = 11; + string new_description = 11; // 格式文字 - string displayDesc = 12; + string display_desc = 12; // 新版格式描述备注 string superscript = 13; } @@ -593,7 +500,7 @@ message StreamLimit { // 编辑播放界面配置-请求 message PlayConfEditReq { // 播放界面配置 - repeated PlayConfState playConf = 1; + repeated PlayConfState play_conf = 1; } // 编辑播放界面配置-响应 @@ -602,18 +509,19 @@ message PlayConfEditReply {} // 播放界面配置 message PlayConfState { // 设置类型 - ConfType confType = 1; + ConfType conf_type = 1; // 是否隐藏 bool show = 2; // 配置字段值 - FieldValue fieldValue = 3; -} -//dash视频流 + FieldValue field_value = 3; +} + +// dash视频流 message DashVideo { // 主线流 - string baseUrl = 1; + string base_url = 1; // 备用流 - repeated string backupUrl = 2; + repeated string backup_url = 2; // 带宽 uint32 bandwidth = 3; // 编码id @@ -625,17 +533,13 @@ message DashVideo { // 伴音质量id uint32 audioId = 7; // 是否非全二压 - bool noRexcode = 8; + bool no_rexcode = 8; } // 视频类型 enum VideoType { - // - Unknown_VALUE = 0; - // flv格式 - FLV_VALUE = 1; - // dash格式 - DASH_VALUE = 2; - // mp4格式 - MP4_VALUE = 3; + Unknown_VALUE = 0; // + FLV_VALUE = 1; // flv格式 + DASH_VALUE = 2; // dash格式 + MP4_VALUE = 3; // mp4格式 } diff --git a/grpc_api/bilibili/app/resource/v1/module.proto b/grpc_api/bilibili/app/resource/v1/module.proto index 944b6fa..08849b0 100644 --- a/grpc_api/bilibili/app/resource/v1/module.proto +++ b/grpc_api/bilibili/app/resource/v1/module.proto @@ -20,13 +20,10 @@ enum EnvType { // enum LevelType { - Undefined = 0; - // 高,需立即下载 - High = 1; - // 中,可以延迟下载 - Middle = 2; - // 低,仅在业务方使用到时由业务方手动进行下载 - Low = 3; + Undefined = 0; // + High = 1; // 高 需立即下载 + Middle = 2; // 中 可以延迟下载 + Low = 3; // 低 仅在业务方使用到时由业务方手动进行下载 } // @@ -65,18 +62,14 @@ message VersionReq { // enum IncrementType { - // 全量包 - Total = 0; - // 增量包 - Incremental = 1; + Total = 0; // 全量包 + Incremental = 1; // 增量包 } // enum CompressType { - // unzip - Unzip = 0; - // 不操作 - Original = 1; + Unzip = 0; // unzip + Original = 1; // 不操作 } message ListReply { diff --git a/grpc_api/bilibili/app/show/popular/v1/popular.proto b/grpc_api/bilibili/app/show/popular/v1/popular.proto index f5557ae..c4113c0 100644 --- a/grpc_api/bilibili/app/show/popular/v1/popular.proto +++ b/grpc_api/bilibili/app/show/popular/v1/popular.proto @@ -17,7 +17,7 @@ message PopularResultReq { int64 idx = 1; // 登录标识 // 1:未登陆用户第一页 2:登陆用户第一页 - int32 loginEvent = 2; + int32 login_event = 2; // 清晰度(旧版) int32 qn = 3; // 视频流版本(旧版) @@ -25,26 +25,26 @@ message PopularResultReq { // 视频流功能(旧版) int32 fnval = 5; // 是否强制使用域名(旧版) - int32 forceHost = 6; + int32 force_host = 6; // 是否4K(旧版) int32 fourk = 7; // 当前页面spm string spmid = 8; // 上此请求末尾项的param - string lastParam = 9; + string last_param = 9; // 上此请求的ver string ver = 10; // 分品类热门的入口ID - int64 entranceId = 11; + int64 entrance_id = 11; // 热门定位id集合 - string locationIds = 12; + string location_ids = 12; // 0:tag页 1:中间页 - int32 sourceId = 13; + int32 source_id = 13; // 数据埋点上报 // 0:代表手动刷新 1:代表自动刷新 int32 flush = 14; // 秒开参数 - bilibili.app.archive.middleware.v1.PlayerArgs playerArgs = 15; + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 15; } // 热门列表-响应 @@ -60,19 +60,19 @@ message PopularReply { // 配置信息 message Config { // 标题 - string itemTitle = 1; + string item_title = 1; // 底部文案 - string bottomText = 2; + string bottom_text = 2; // 底部图片url - string bottomTextCover = 3; + string bottom_text_cover = 3; // 底部跳转页url - string bottomTextUrl = 4; + string bottom_text_url = 4; // 顶部按钮信息列表 - repeated EntranceShow topItems = 5; + repeated EntranceShow top_items = 5; // 头图url - string headImage = 6; + string head_image = 6; // 当前页按钮信息 - repeated EntranceShow pageItems = 7; + repeated EntranceShow page_items = 7; // int32 hit = 8; } @@ -84,23 +84,23 @@ message EntranceShow { // 按钮名 string title = 2; // 入口模块id - string moduleId = 3; + string module_id = 3; // 跳转uri string uri = 4; // 气泡信息 Bubble bubble = 5; // 入口id - int64 entranceId = 6; + int64 entrance_id = 6; // 头图url - string topPhoto = 7; + string top_photo = 7; // 入口类型 - int32 entranceType = 8; + int32 entrance_type = 8; } // 气泡信息 message Bubble { // 文案 - string bubbleContent = 1; + string bubble_content = 1; // 版本 int32 version = 2; // 起始时间 diff --git a/grpc_api/bilibili/app/show/rank/v1/rank.proto b/grpc_api/bilibili/app/show/rank/v1/rank.proto index 395100d..05d9159 100644 --- a/grpc_api/bilibili/app/show/rank/v1/rank.proto +++ b/grpc_api/bilibili/app/show/rank/v1/rank.proto @@ -52,7 +52,7 @@ message Item { // 跳转uri string uri = 4; // 重定向url - string redirectUrl = 5; + string redirect_url = 5; // 跳转类型 // av:视频稿件 string goto = 6; @@ -71,7 +71,7 @@ message Item { // 收藏数 int32 favourite = 13; // 发布时间 - int64 pubDate = 14; + int64 pub_date = 14; // 分区tid int32 rid = 15; // 子分区名 @@ -92,7 +92,7 @@ message Item { // UP主粉丝数 int64 follower = 23; // UP主认证信息 - OfficialVerify officialVerify = 24; + OfficialVerify official_verify = 24; // 同一UP收起子项列表 repeated Item children = 25; // 关系信息 @@ -114,7 +114,7 @@ message Relation { // 1:未关注 2:已关注 3:被关注 4:互相关注 int32 status = 1; // 是否关注 - int32 isFollow = 2; + int32 is_follow = 2; // 是否粉丝 - int32 isFollowed = 3; + int32 is_followed = 3; } \ No newline at end of file diff --git a/grpc_api/bilibili/app/show/region/v1/region.proto b/grpc_api/bilibili/app/show/region/v1/region.proto index 4c6aba5..fa70ca6 100644 --- a/grpc_api/bilibili/app/show/region/v1/region.proto +++ b/grpc_api/bilibili/app/show/region/v1/region.proto @@ -23,9 +23,9 @@ message RegionReply { // message RegionConfig { // - string scenesName = 1; + string scenes_name = 1; // - string scenesType = 2; + string scenes_type = 2; } // @@ -47,7 +47,7 @@ message RegionInfo { // int32 type = 8; // - int32 isBangumi = 9; + int32 is_bangumi = 9; // repeated RegionInfo children = 10; // diff --git a/grpc_api/bilibili/app/space/v1/space.proto b/grpc_api/bilibili/app/space/v1/space.proto index 173e45d..1afa8f2 100644 --- a/grpc_api/bilibili/app/space/v1/space.proto +++ b/grpc_api/bilibili/app/space/v1/space.proto @@ -27,7 +27,7 @@ message ArchiveReply { // int32 count = 2; // - EpisodicButton episodicButton = 3; + EpisodicButton episodic_button = 3; // repeated OrderConfig order = 4; } @@ -37,19 +37,19 @@ message Badge { // string text = 1; // - string textColor = 2; + string text_color = 2; // - string textColorNight = 3; + string text_color_night = 3; // - string bgColor = 4; + string bg_color = 4; // - string bgColorNight = 5; + string bg_color_night = 5; // - string borderColor = 6; + string border_color = 6; // - string borderColorNight = 7; + string border_color_night = 7; // - int32 bgStyle = 8; + int32 bg_style = 8; } // @@ -75,19 +75,19 @@ message BiliSpaceVideo { // bool state = 10; // - bool isPopular = 11; + bool is_popular = 11; // repeated Badge badges = 12; // - string coverRight = 13; + string cover_right = 13; // string bvid = 14; // - bool isSteins = 15; + bool is_steins = 15; // - bool isUgcpay = 16; + bool is_ugcpay = 16; // - bool isCooperation = 17; + bool is_cooperation = 17; } // diff --git a/grpc_api/bilibili/app/splash/v1/splash.proto b/grpc_api/bilibili/app/splash/v1/splash.proto index 342316a..8bbad59 100644 --- a/grpc_api/bilibili/app/splash/v1/splash.proto +++ b/grpc_api/bilibili/app/splash/v1/splash.proto @@ -19,7 +19,7 @@ message SplashReq { // string birth = 3; // - string adExtra = 4; + string ad_extra = 4; // string network = 5; } @@ -27,11 +27,11 @@ message SplashReq { //-响应 message SplashReply { // - int32 maxTime = 1; + int32 max_time = 1; // - int32 minInterval = 2; + int32 min_interval = 2; // - int32 pullInterval = 3; + int32 pull_interval = 3; // repeated SplashItem list = 4; // @@ -55,77 +55,77 @@ message SplashItem { // int32 type = 2; // - int32 cardType = 3; + int32 card_type = 3; // int32 duration = 4; // - int64 beginTime = 5; + int64 begin_time = 5; // - int64 endTime = 6; + int64 end_time = 6; // string thumb = 7; // string hash = 8; // - string logoUrl = 9; + string logo_url = 9; // - string logoHash = 10; + string logo_hash = 10; // - string videoUrl = 11; + string video_url = 11; // - string videoHash = 12; + string video_hash = 12; // - int32 videoWidth = 13; + int32 video_width = 13; // - int32 videoHeight = 14; + int32 video_height = 14; // string schema = 15; // - string schemaTitle = 16; + string schema_title = 16; // - string schemaPackageName = 17; + string schema_package_name = 17; // - repeated string schemaCallupWhiteList = 18; + repeated string schema_callup_whiteList = 18; // int32 skip = 19; // string uri = 20; // - string uriTitle = 21; + string uri_title = 21; // int32 source = 22; // - int32 cmMark = 23; + int32 cm_mark = 23; // - string adCb = 24; + string ad_cb = 24; // - int64 resourceId = 25; + int64 resource_id = 25; // - string requestId = 26; + string request_id = 26; // - string clientIp = 27; + string client_ip = 27; // - bool isAd = 28; + bool is_ad = 28; // - bool isAdLoc = 29; + bool is_ad_loc = 29; // google.protobuf.Any extra = 30; // - int64 cardIndex = 31; + int64 card_index = 31; // - int64 serverType = 32; + int64 server_type = 32; // int64 index = 33; // - string clickUrl = 34; + string click_url = 34; // - string showUrl = 35; + string show_url = 35; // - int32 timeTarget = 36; + int32 time_target = 36; // int32 encryption = 37; // - bool enablePreDownload = 38; + bool enable_pre_download = 38; // - bool enableBackgroundDownload = 39; + bool enable_background_download = 39; } \ No newline at end of file diff --git a/grpc_api/bilibili/app/view/v1/view.proto b/grpc_api/bilibili/app/view/v1/view.proto index 1b5eab8..91012f4 100644 --- a/grpc_api/bilibili/app/view/v1/view.proto +++ b/grpc_api/bilibili/app/view/v1/view.proto @@ -38,7 +38,7 @@ message ViewReq { // AI trackid string trackid = 4; // 广告扩展数据 - string adExtra = 5; + string ad_extra = 5; // 清晰度(旧版) int32 qn = 6; // 流版本(旧版) @@ -46,17 +46,17 @@ message ViewReq { // 流类型(旧版) int32 fnval = 8; // 是否强制使用域名(旧版) - int32 forceHost = 9; + int32 force_host = 9; // 是否允许4K(旧版) int32 fourk = 10; // 当前页面spm string spmid = 11; // 上一页面spm - string fromSpmid = 12; + string from_spmid = 12; // int32 autoplay = 13; // 视频秒开参数 - bilibili.app.archive.middleware.v1.PlayerArgs playerArgs = 14; + bilibili.app.archive.middleware.v1.PlayerArgs player_args = 14; } // 视频页信息-响应 @@ -66,17 +66,17 @@ message ViewReply { // 分P信息 repeated ViewPage pages = 2; // UP主扩展信息 ("OnwerExt"为源码中拼写错误) - OnwerExt ownerExt = 3; + OnwerExt owner_ext = 3; // 稿件用户操作状态 - ReqUser reqUser = 4; + ReqUser req_user = 4; // 稿件TAG repeated Tag tag = 5; // TAG对应的图标 - map tIcon = 6; + map t_icon = 6; // 稿件映射的PGC剧集信息 Season season = 7; // 充电排行 - ElecRank elecRank = 8; + ElecRank elec_rank = 8; // 历史观看进度 History history = 9; // 视频相关推荐列表 @@ -84,59 +84,59 @@ message ViewReply { // 不感兴趣原因 Dislike dislike = 11; // 播放图标动画配置档 - PlayerIcon playerIcon = 12; + PlayerIcon player_icon = 12; // - string vipActive = 13; + string vip_active = 13; // 稿件bvid string bvid = 14; // 获得荣誉信息 Honor honor = 15; // 相关推荐顶部tab - repeated RelateTab relateTab = 16; + repeated RelateTab relate_tab = 16; // 参与的活动页面url - string activityUrl = 17; + string activity_url = 17; // 稿件引用bgm列表 repeated Bgm bgm = 18; // 联合投稿成员列表 repeated Staff staff = 19; // 争议信息 - string argueMsg = 20; + string argue_msg = 20; // 短链接 - string shortLink = 21; + string short_link = 21; // 播放实验 // 1:相关推荐自动播放 - int32 playParam = 22; + int32 play_param = 22; // 标签 Label label = 23; // UGC视频合集信息 - UgcSeason ugcSeason = 24; + UgcSeason ugc_season = 24; // 配置信息 Config config = 25; // 分享副标题(已观看xxx次) - string shareSubtitle = 26; + string share_subtitle = 26; // 互动视频信息 Interaction interaction = 27; // 错误码 // DEFAULT:正常 CODE404:视频被UP主删除 ECode ecode = 28; // 404页信息 - CustomConfig customConfig = 29; + CustomConfig custom_config = 29; // 广告 repeated CM cms = 30; // 广告配置 - CMConfig cmConfig = 31; + CMConfig cm_config = 31; // 播放页定制tab Tab tab = 32; // 排行榜 Rank rank = 33; // 免流面板定制 - TFPanelCustomized tfPanelCustomized = 34; + TFPanelCustomized tf_panel_customized = 34; // UP主发起活动 - UpAct upAct = 35; + UpAct up_act = 35; // 用户装扮 - UserGarb userGarb = 36; + UserGarb user_garb = 36; // 大型活动合集 - ActivitySeason activitySeason = 37; + ActivitySeason activity_season = 37; // 评论样式 string badge_url = 38; // 直播预约信息 @@ -164,11 +164,11 @@ message ActivitySeason { // 分P信息 repeated ViewPage pages = 2; //("OnwerExt"为源码中拼写错误) - OnwerExt ownerExt = 3; + OnwerExt owner_ext = 3; // 稿件用户操作状态 - ReqUser reqUser = 4; + ReqUser req_user = 4; // 充电排行 - ElecRank elecRank = 5; + ElecRank elec_rank = 5; // 历史观看进度 History history = 6; // 稿件bvid @@ -178,7 +178,7 @@ message ActivitySeason { // 联合投稿成员列表 repeated Staff staff = 9; // UGC视频合集信息 - UgcSeason ugcSeason = 10; + UgcSeason ugc_season = 10; // 播放页定制tab Tab tab = 11; // 排行榜 @@ -186,32 +186,32 @@ message ActivitySeason { // 预约模块 Order order = 13; // 是否支持点踩 - bool supportDislike = 14; + bool support_dislike = 14; // 相关推荐(运营配置+AI推荐) - OperationRelate operationRelate = 15; + OperationRelate operation_relate = 15; // 活动页资源包 - ActivityResource activityResource = 16; + ActivityResource activity_resource = 16; // 短链接 - string shortLink = 17; + string short_link = 17; // 标签 Label label = 18; // 不感兴趣原因 Dislike dislike = 19; // 播放图标动画配置档 - PlayerIcon playerIcon = 20; + PlayerIcon player_icon = 20; // 分享副标题(已观看xxx次) - string shareSubtitle = 21; + string share_subtitle = 21; // 广告配置 - CMConfig cmConfig = 22; + CMConfig cm_config = 22; // 免流面板定制 - TFPanelCustomized tfPanelCustomized = 23; + TFPanelCustomized tf_panel_customized = 23; // 争议信息 - string argueMsg = 24; + string argue_msg = 24; // 错误码 // DEFAULT:正常 CODE404:视频被UP主删除 ECode ecode = 25; // 404页信息 - CustomConfig customConfig = 26; + CustomConfig custom_config = 26; // 评论样式 string badge_url = 27; // 稿件简介v2 @@ -232,32 +232,29 @@ message DescV2 { // 枚举-文本类型 enum DescType { - // 占位 - DescTypeUnknown = 0; - // 文本 - DescTypeText = 1; - // @ - DescTypeAt = 2; + DescTypeUnknown = 0; // 占位 + DescTypeText = 1; // 文本 + DescTypeAt = 2; // @ } // 活动页资源包 message ActivityResource { // mod资源池名称 - string modPoolName = 1; + string mod_pool_name = 1; // mod资源名称 - string modResourceName = 2; + string mod_resource_name = 2; // 背景色 - string bgColor = 3; + string bg_color = 3; // 选中背景色 string selectedBgColor = 4; // 文字颜色 - string textColor = 5; + string selected_bg_color = 5; // 浅字色 - string lightTextColor = 6; + string light_text_color = 6; // 深字色 - string darkTextColor = 7; + string dark_text_color = 7; // 分割线色 - string dividerColor = 8; + string divider_color = 8; } // 相关推荐(运营配置+AI推荐) @@ -265,7 +262,7 @@ message OperationRelate { // 模块标题 string title = 1; // 相关推荐模块内容 - repeated RelateItem relateItem = 2; + repeated RelateItem relate_item = 2; // AI相关推荐 repeated Relate ai_relate_item = 3; } @@ -285,21 +282,21 @@ message Order { // 模块标题 string title = 2; // 按钮文字 未操作 - string buttonTitle = 3; + string button_title = 3; // 按钮文字 已操作 - string buttonSelectedTitle = 4; + string button_selected_title = 4; // 合集播放数 - int64 seasonStatView = 5; + int64 season_stat_view = 5; // 合集弹幕数 - int64 seasonStatDanmaku = 6; + int64 season_stat_danmaku = 6; // 预约类型(点击时透传,直播开始前预约活动,直播开始后收藏合集) - BizType orderType = 7; + BizType order_type = 7; // 预约业务参数 - oneof orderParamCase { + oneof order_param { // 预约活动参数 - BizReserveActivityParam bizReserveActivityParam = 8; + BizReserveActivityParam reserve = 8; // 收藏合集参数 - BizFavSeasonParam bizFavSeasonParam = 9; + BizFavSeasonParam fav_season = 9; } // 合集简介 string intro = 10; @@ -307,17 +304,12 @@ message Order { // 业务类型 enum BizType { - BizTypeNone = 0; - // 追番追剧 - BizTypeFollowVideo = 1; - // 预约活动 - BizTypeReserveActivity = 2; - // 跳转链接 - BizTypeJumpLink = 3; - // 收藏合集 - BizTypeFavSeason = 4; - // 预约游戏 - BizTypeReserveGame = 5; + BizTypeNone = 0; // + BizTypeFollowVideo = 1; // 追番追剧 + BizTypeReserveActivity = 2; // 预约活动 + BizTypeJumpLink = 3; // 跳转链接 + BizTypeFavSeason = 4; // 收藏合集 + BizTypeReserveGame = 5; // 预约游戏 } // 用户装扮信息 @@ -331,7 +323,7 @@ message Rank { // 排行榜icon string icon = 1; // 排行榜icon 夜间模式 - string iconNight = 2; + string icon_night = 2; // 排行榜文案 string text = 3; } @@ -351,9 +343,9 @@ message Tab { // 文字 string text = 6; // 未选中态字色 - string textColor = 7; + string text_color = 7; // 选中态字色 - string textColorSelected = 8; + string text_color_selected = 8; // 图片 string pic = 9; // 后台配置自增 @@ -362,30 +354,22 @@ message Tab { // TAB样式 enum TabStyle { - // 未知样式 - UnknownStyle = 0; - // 文字样式 - Text = 1; - // 图片样式 - Pic = 2; + UnknownStyle = 0; // 未知样式 + Text = 1; // 文字样式 + Pic = 2; // 图片样式 } // TAB跳转类型 enum TabOtype { - // 未知类型 - UnknownOtype = 0; - // url链接 - URL = 1; - // native话题活动 - TopicNA = 2; + UnknownOtype = 0; // 未知类型 + URL = 1; // url链接 + TopicNA = 2; // native话题活动 } // 错误代码 enum ECode { - //正常 - DEFAULT = 0; - // 稿件被UP主删除 - CODE404 = 1; + DEFAULT = 0; // 正常 + CODE404 = 1; // 稿件被UP主删除 } // 分P信息 @@ -397,9 +381,9 @@ message ViewPage { // 分P弹幕信息 DM dm =3; // 下载文案 - string downloadTitle = 4; + string download_title = 4; // 分P完整标题(视频标题+分P标题) - string downloadSubtitle = 5; + string download_subtitle = 5; } // 音频稿件信息 @@ -407,19 +391,19 @@ message Audio { // 音频标题 string title = 1; // 音频封面url - string coverUrl = 2; + string cover_url = 2; // 音频auid - int64 songId = 3; + int64 song_id = 3; // 音频播放量 - int64 playCount = 4; + int64 play_count = 4; // 音频评论数 - int64 replyCount = 5; + int64 reply_count = 5; // 音频作者UID - int64 upperId = 6; + int64 upper_id = 6; // 进入按钮文案 string entrance = 7; // - int64 songAttr = 8; + int64 song_attr = 8; } // 分P弹幕信息 @@ -428,7 +412,7 @@ message DM { // 0:正常 1:关闭 bool closed = 1; // - bool realName = 2; + bool real_name = 2; // 分P弹幕总数 int64 count = 3; } @@ -436,7 +420,7 @@ message DM { // UP主扩展信息 ("OnwerExt"为源码中拼写错误) message OnwerExt { // 认证信息 - OfficialVerify officialVerify = 1; + OfficialVerify official_verify = 1; // 直播信息 Live live = 2; // 会员信息 @@ -446,7 +430,7 @@ message OnwerExt { // 粉丝数 int64 fans = 5; // 总投稿数 - string arcCount = 6; + string arc_count = 6; } // 认证信息 @@ -467,7 +451,7 @@ message Live { // 直播间url string uri = 3; // - string endpageUri = 4; + string endpage_uri = 4; } // 会员信息 @@ -475,17 +459,17 @@ message Vip { //会员类型 int32 type = 1; //到期时间 - int64 dueDate = 2; + int64 due_date = 2; // - string dueRemark = 3; + string due_remark = 3; // - int32 accessStatus = 4; + int32 access_status = 4; //会员状态 - int32 vipStatus = 5; + int32 vip_status = 5; // - string vipStatusWarn = 6; + string vip_status_warn = 6; // - int32 themeType = 7; + int32 theme_type = 7; // VipLabel label = 8; } @@ -505,7 +489,7 @@ message ReqUser { // 用户是否关注UP int32 attention = 1; // UP是否关注用户 - int32 guestAttention = 2; + int32 guest_attention = 2; // 是否收藏 int32 favorite = 3; // 是否点赞 @@ -515,9 +499,9 @@ message ReqUser { // 是否投币 int32 coin = 6; // 关注等级 - int32 attentionLevel = 7; + int32 attention_level = 7; // 是否收藏合集 - int32 favSeason = 8; + int32 fav_season = 8; } // TAG信息 @@ -538,7 +522,7 @@ message Tag { string uri = 7; // TAG类型 // common:普通 new:话题 act:活动 - string tagType = 8; + string tag_type = 8; } // TAG图标信息 @@ -550,27 +534,27 @@ message TIcon { // 剧集信息 message Season { // - string allowDownload = 1; + string allow_download = 1; // 剧集ssid - int64 seasonId = 2; + int64 season_id = 2; // 是否重定向跳转 - int32 isJump = 3; + int32 is_jump = 3; // 剧集标题 string title = 4; // 剧集封面url string cover = 5; // 剧集是否完结 - int32 isFinish = 6; + int32 is_finish = 6; // 最新一话epid - int64 newestEpId = 7; + int64 newest_ep_id = 7; // 最新一话标题 - string newestEpIndex = 8; + string newest_ep_index = 8; // 总集数 - int64 totalCount = 9; + int64 total_count = 9; // 更新星期日 int32 weekday = 10; // 用户追番标志 - UserSeason userSeason = 11; + UserSeason user_season = 11; // SeasonPlayer player = 12; // 单集页面url @@ -647,7 +631,7 @@ message Relate { // 跳转uri string uri = 9; // - string jumpUrl = 10; + string jump_url = 10; // 评分 double rating = 11; // @@ -658,19 +642,19 @@ message Relate { // 备注 string desc = 14; // - string rcmdReason = 15; + string rcmd_reason = 15; // 标志文字 string badge = 16; // 1P cid int64 cid = 17; // - int32 seasonType = 18; + int32 season_type = 18; // - int32 ratingCount = 19; + int32 rating_count = 19; // 标签文案 - string tagName = 20; + string tag_name = 20; // 游戏礼包信息 - PackInfo packInfo = 21; + PackInfo pack_info = 21; // Notice notice = 22; // 按钮信息 @@ -678,16 +662,16 @@ message Relate { // spm追踪id string trackid = 24; // 游戏卡片新样式 - int32 newCard = 25; + int32 new_card = 25; // 推荐理由样式 - ReasonStyle rcmdReasonStyle = 26; + ReasonStyle rcmd_reason_style = 26; // - string coverGif = 27; + string cover_gif = 27; // 广告 CM cm = 28; // 游戏卡字段 // 0:下载 1:预约(跳过详情) 2:预约 3:测试 4:测试+预约 5:跳过详情页 - int64 reserveStatus = 29; + int64 reserve_status = 29; } // 推荐理由样式 @@ -695,19 +679,19 @@ message ReasonStyle { // string text = 1; // 日间模式文字 - string textColor = 2; + string text_color = 2; // - string bgColor = 3; + string bg_color = 3; // - string borderColor = 4; + string border_color = 4; // 夜间模式文字 - string textColorNight = 5; + string text_color_night = 5; // - string bgColorNight = 6; + string bg_color_night = 6; // - string borderColorNight = 7; + string border_color_night = 7; // 1:填充 2:描边 3:填充 + 描边 4:背景不填充 + 背景不描边 - int32 bgStyle = 8; + int32 bg_style = 8; // int32 selected = 9; } @@ -756,7 +740,7 @@ message DislikeReasons { // 相关分区tid int32 rid = 3; // 相关TAG id - int64 tagId = 4; + int64 tag_id = 4; // 相关名称 string name = 5; } @@ -775,8 +759,8 @@ message PlayerIcon { // 广告 message CM { - // 广告数据(需要二次解包) - google.protobuf.Any sourceContent = 1; + // 广告数据(需解包) + google.protobuf.Any source_content = 1; } // @@ -826,7 +810,7 @@ message CreativeContent { // 广告配置 message CMConfig { // 广告配置数据(需要二次解包) - google.protobuf.Any adsControl = 1; + google.protobuf.Any ads_control = 1; } // @@ -876,13 +860,13 @@ message Staff { // 成员昵称 string name = 4; // 成员官方信息 - OfficialVerify officialVerify = 5; + OfficialVerify official_verify = 5; // 成员会员信息 Vip vip = 6; // 是否关注该成员 int32 attention = 7; // - int32 labelStyle = 8; + int32 label_style = 8; } // @@ -895,12 +879,9 @@ message Label { // enum SeasonType { - // - Unknown = 0; - // - Base = 1; - // - Good = 2; + Unknown = 0; // + Base = 1; // + Good = 2; // } // UGC视频合集信息 @@ -917,26 +898,28 @@ message UgcSeason { repeated Section sections = 5; // 合集状态数 UgcSeasonStat stat = 6; - // - string labelText = 7; - // - string labelTextColor = 8; - // - string labelBgColor = 9; - // - string labelBgNightColor = 11; - // - string labelTextNightColor = 10; + // 标签字色 + string label_text = 7; + // 标签背景色 + string label_text_color = 8; + // 标签夜间字色 + string label_bg_color = 9; + // 标签夜间背景色 + string label_text_night_color = 10; + // 右侧描述文案 + string label_bg_night_color = 11; // 按钮文案 string descRight = 12; // 分集总数 - int64 epCount = 13; + int64 ep_count = 13; + // 合集类型 + SeasonType season_type = 14; } -//ugc视频合集状态数 +// ugc视频合集状态数 message UgcSeasonStat { // 合集id - int64 seasonId = 1; + int64 season_id = 1; // 观看数 int32 view = 2; // 弹幕数 @@ -950,9 +933,9 @@ message UgcSeasonStat { // 分享数 int32 share = 7; // 当前排名 - int32 nowRank = 8; + int32 now_rank = 8; // 历史最高排名 - int32 hisRank = 9; + int32 his_rank = 9; // 总计点赞 int32 like = 10; } @@ -997,25 +980,25 @@ message Episode { // message Config { // 下方推荐项标题 - string relatesTitle = 1; + string relates_title = 1; // - int32 relatesStyle = 2; + int32 relates_style = 2; // - int32 relateGifExp = 3; + int32 relate_gif_exp = 3; // - int32 endPageHalf = 4; + int32 end_page_half = 4; // - int32 endPageFull = 5; + int32 end_page_full = 5; // 退出是否自动小窗 - bool autoSwindow = 6; + bool auto_swindow = 6; } // message Interaction { // - Node historyNode = 1; + Node history_node = 1; // - int64 graphVersion = 2; + int64 graph_version = 2; // string msg = 3; // @@ -1029,23 +1012,23 @@ message Honor { // 荣誉栏图标url string icon = 1; // 荣誉栏图标url 夜间模式 - string iconNight = 2; + string icon_night = 2; // 荣誉文案 string text = 3; // 荣誉副文案 - string textExtra = 4; + string text_extra = 4; // 标题颜色 - string textColor = 5; + string text_color = 5; // 标题颜色 夜间模式 - string textColorNight = 6; + string text_color_night = 6; // 背景颜色 - string bgColor = 7; + string bg_color = 7; // 背景颜色 夜间模式 - string bgColorNight = 8; + string bg_color_night = 8; // 跳转uri string url = 9; // 跳转角标文案 - string urlText = 10; + string url_text = 10; } // @@ -1077,7 +1060,7 @@ message UpAct { // message Node { // - int64 nodeId = 1; + int64 node_id = 1; // string title = 2; // @@ -1091,13 +1074,13 @@ message ViewProgressReq { // 视频cid int64 cid = 2; // UP主mid - int64 upMid = 3; + int64 up_mid = 3; } // 稿件播放中数据-回复 message ViewProgressReply { // 视频引导信息 - VideoGuide videoGuide = 1; + VideoGuide video_guide = 1; // Chronos灰度管理 Chronos chronos = 2; } @@ -1117,21 +1100,21 @@ message VideoGuide{ // 互动弹幕 repeated CommandDm commandDms = 2; // 运营卡片 - repeated OperationCard operationCard = 3; + repeated OperationCard operation_card = 3; // 运营卡片新版 - repeated OperationCardNew operationCardNew = 4; + repeated OperationCardNew operation_card_new = 4; // 契约卡 - ContractCard contractCard = 5; + ContractCard contract_card = 5; } // 契约卡 message ContractCard { // 需要触发的播放进度百分比 - float displayProgress = 1; + float display_progress = 1; // 触发位置的前后误差(单位ms) - int64 displayAccuracy = 2; + int64 display_accuracy = 2; // 展示持续时间(单位ms) - int64 displayDuration = 3; + int64 display_duration = 3; // 弹出模式 // 0: 原有模式 1: 半屏弹出 2: 全屏、半屏均弹出 int32 show_mode = 4; @@ -1166,24 +1149,24 @@ message OperationCardNew { // true已操作 false未操作 bool status = 4; // 卡片类型 - OperationCardType cardType = 5; + OperationCardType card_type = 5; // 卡片渲染 - oneof renderCase { + oneof render { // 标准卡 - StandardCard standardCard= 6; + StandardCard standard = 6; // 老运营卡片(原B剪跳转卡) - OperationCard operationCard = 7; + OperationCard skip = 7; } // - BizType bizType = 8; + BizType biz_type = 8; // - oneof paramCase { + oneof param { // 追番追剧参数 - BizFollowVideoParam FollowVideoParam = 9; + BizFollowVideoParam follow = 9; // 预约活动参数 - BizReserveActivityParam ReserveActivityParam = 10; + BizReserveActivityParam reserve = 10; // 跳转参数 - BizJumpLinkParam LinkParam = 11; + BizJumpLinkParam jump = 11; // 预约游戏参数 BizReserveGameParam game = 12; } @@ -1191,12 +1174,9 @@ message OperationCardNew { // 卡片样式 enum OperationCardType { - // - CardTypeNone = 0; - // 标准卡 - CardTypeStandard = 1; - // 原跳转卡 - CardTypeSkip = 2; + CardTypeNone = 0; // + CardTypeStandard = 1; // 标准卡 + CardTypeSkip = 2; // 原跳转卡 } // 标准卡 @@ -1204,25 +1184,25 @@ message StandardCard { // 卡片文案 string title = 1; // 按钮文字 未操作 - string buttonTitle = 2; + string button_title = 2; // 按钮文字 已操作 - string buttonSelectedTitle = 3; + string button_selected_title = 3; // 已操作态是否显示 - bool showSelected = 4; + bool show_selected = 4; } // 老运营卡片 message OperationCard { // 开始时间(单位为秒) - int32 startTime = 1; + int32 start_time = 1; // 结束时间(单位为秒) - int32 endTime = 2; + int32 end_time = 2; // 图标 string icon = 3; // 标题 string title = 4; // 按钮文案 - string buttonText = 5; + string button_text = 5; // 跳转链接 string url = 6; // 内容描述 @@ -1256,51 +1236,51 @@ message CommandDm { // 关注按钮卡片 message Attention { // 开始时间 - int32 startTime = 1; + int32 start_time = 1; // 结束时间 - int32 endTime = 2; + int32 end_time = 2; // 位置x坐标 - double posX = 3; + double pos_x = 3; // 位置y坐标 - double posY = 4; + double pos_y = 4; } // 404页信息 message CustomConfig { // 重定向页面url - string redirectUrl = 1; + string redirect_url = 1; } // 免流面板定制 message TFPanelCustomized { // 右侧按钮素材 - string rightBtnImg = 1; + string right_btn_img = 1; // 右侧按钮文案 - string rightBtnText = 2; + string right_btn_text = 2; // 右侧按钮字体颜色 - string rightBtnTextColor = 3; + string right_btn_text_color = 3; // 右侧按钮跳转链接 - string rightBtnLink = 4; + string right_btn_link = 4; // 中心主文案内容 - string mainLabel = 5; + string main_label = 5; // 运营商(cm ct cu) string operator = 6; // 子面板定制化配置 - map entry = 7; + map sub_panel = 7; } // 免流子面板定制化配置 message subTFPanel { // 右侧按钮素材 - string rightBtnImg = 1; + string right_btn_img = 1; // 右侧按钮文案 - string rightBtnText = 2; + string right_btn_text = 2; // 右侧按钮字体颜色 - string rightBtnTextColor = 3; + string right_btn_text_color = 3; // 右侧按钮跳转链接 - string rightBtnLink = 4; + string right_btn_link = 4; // 中心主文案内容 - string mainLabel = 5; + string main_label = 5; // 运营商 string operator = 6; } @@ -1316,7 +1296,7 @@ message ShortFormVideoDownloadReq { // 设备buvid string buvid = 4; // 移动端包类型 - string mobiApp = 5; + string mobi_app = 5; // 移动端版本号 int64 build = 6; // 运行设备 @@ -1330,9 +1310,9 @@ message ShortFormVideoDownloadReq { // 短视频下载-响应 message ShortFormVideoDownloadReply { // 是否有下载分享按钮 - bool hasDownloadUrl = 1; + bool has_download_url = 1; // 下载url - string downloadUrl = 2; + string download_url = 2; // 文件md5 string md5 = 3; // 文件大小(单位为Byte) @@ -1357,15 +1337,15 @@ message ClickPlayerCardReq { // 点击大型活动页预约-请求 message ClickActivitySeasonReq { // 预约类型 - BizType orderType = 1; + BizType order_type = 1; // 当前页面spm string spmid = 2; // 业务参数 - oneof orderParamCase { + oneof order_param { // 预约活动参数 - BizReserveActivityParam bizReserveActivityParam = 3; + BizReserveActivityParam reserve = 3; // 收藏合集参数 - BizFavSeasonParam bizFavSeasonParam = 4; + BizFavSeasonParam fav_season = 4; } // 操作 //0:操作 1:取消操作 @@ -1375,13 +1355,13 @@ message ClickActivitySeasonReq { // message BizFollowVideoParam { // - int64 seasonId = 1; + int64 season_id = 1; } // 预约活动参数 message BizReserveActivityParam { // 活动id - int64 activityId = 1; + int64 activity_id = 1; // 场景 string from = 2; // 类型 @@ -1404,13 +1384,13 @@ message BizReserveGameParam { // 收藏合集参数 message BizFavSeasonParam { // 合集id - int64 seasonId = 1; + int64 season_id = 1; } // 合集详情页-请求 message SeasonReq { // 合集id - int64 seasonId = 1; + int64 season_id = 1; } // 合集详情页-响应 @@ -1422,7 +1402,7 @@ message SeasonReply { // 播放器卡片曝光-请求 message ExposePlayerCardReq { // 卡片类型 - PlayerCardType cardType = 1; + PlayerCardType card_type = 1; // 稿件avid int64 aid = 2; // 视频cid @@ -1433,14 +1413,10 @@ message ExposePlayerCardReq { // 卡片类型 enum PlayerCardType { - // - PlayerCardTypeNone_VALUE = 0; - // 关注卡 - PlayerCardTypeAttention_VALUE = 1; - // 运营卡 - PlayerCardTypeOperation_VALUE = 2; - // 契约卡 - PlayerCardTypeContract_VALUE = 3; + PlayerCardTypeNone_VALUE = 0; // + PlayerCardTypeAttention_VALUE = 1; // 关注卡 + PlayerCardTypeOperation_VALUE = 2; // 运营卡 + PlayerCardTypeContract_VALUE = 3; // 契约卡 } // 点击签订契约-请求 @@ -1448,7 +1424,7 @@ message AddContractReq { // 稿件avid int64 aid = 1; // UP主mid - int64 upMid = 2; + int64 up_mid = 2; // 当前页面spm string spmid = 3; } diff --git a/grpc_api/bilibili/cheese/gateway/player/v1/playurl.proto b/grpc_api/bilibili/cheese/gateway/player/v1/playurl.proto index 70113ba..4414d6b 100644 --- a/grpc_api/bilibili/cheese/gateway/player/v1/playurl.proto +++ b/grpc_api/bilibili/cheese/gateway/player/v1/playurl.proto @@ -88,56 +88,31 @@ message PlayViewReply { // 禁用功能配置 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 outer_dm_disable = 25; - // 三点内弹幕设置 - bool inner_dm_disable = 26; - // 画中画 - bool small_window_disable = 27; + 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 outer_dm_disable = 25; // 外层面板弹幕设置 + bool inner_dm_disable = 26; // 三点内弹幕设置 + bool small_window_disable = 27; // 画中画 } // 投屏地址-响应 diff --git a/grpc_api/bilibili/community/service/dm/v1/dm.proto b/grpc_api/bilibili/community/service/dm/v1/dm.proto index b2856f5..ac4933e 100644 --- a/grpc_api/bilibili/community/service/dm/v1/dm.proto +++ b/grpc_api/bilibili/community/service/dm/v1/dm.proto @@ -61,7 +61,7 @@ message DmSegOttReply { } // 获取弹幕-请求 -message DmSegMobileReq{ +message DmSegMobileReq { // 稿件avid/漫画epid int64 pid = 1; // 视频cid/漫画cid @@ -70,20 +70,20 @@ message DmSegMobileReq{ // 1:视频 2:漫画 int32 type = 3; // 分段(6min) - int64 segmentIndex = 4; + int64 segment_index = 4; // 是否青少年模式 - int32 teenagersMode = 5; + int32 teenagers_mode = 5; } // 获取弹幕-响应 -message DmSegMobileReply{ +message DmSegMobileReply { // 弹幕列表 repeated DanmakuElem elems = 1; // 是否已关闭弹幕 // 0:未关闭 1:已关闭 int32 state = 2; // 弹幕云屏蔽ai评分值 - DanmakuAIFlag aiFlag = 3; + DanmakuAIFlag ai_flag = 3; } // 客户端弹幕元数据-请求 @@ -98,11 +98,11 @@ message DmViewReq { // 页面spm string spmid = 4; // 是否冷启 - int32 isHardBoot = 5; + int32 is_hard_boot = 5; } // 客户端弹幕元数据-响应 -message DmViewReply{ +message DmViewReply { // 是否已关闭弹幕 // 0:未关闭 1:已关闭 bool closed = 1; @@ -111,23 +111,23 @@ message DmViewReply{ // 视频字幕 VideoSubtitle subtitle = 3; // 高级弹幕专包url(bfs) - repeated string specialDms = 4; + repeated string special_dms = 4; // 云屏蔽配置信息 - DanmakuFlagConfig aiFlag = 5; + DanmakuFlagConfig ai_flag = 5; // 弹幕配置信息 - DanmuPlayerViewConfig playerConfig = 6; + DanmuPlayerViewConfig player_config = 6; // 弹幕发送框样式 - int32 sendBoxStyle = 7; + int32 send_box_style = 7; // 是否允许 bool allow = 8; // check box 是否展示 - string checkBox = 9; + string check_box = 9; // check box 展示文本 - string checkBoxShowMsg = 10; + string check_box_show_msg = 10; // 展示文案 - string textPlaceholder = 11; + string text_placeholder = 11; // 弹幕输入框文案 - string inputPlaceholder = 12; + string input_placeholder = 12; // 用户举报弹幕 cid维度屏蔽的正则规则 repeated string report_filter_content = 13; } @@ -203,7 +203,7 @@ message VideoMask { // 间隔时间 int64 time = 4; // 蒙版url - string maskUrl = 5; + string mask_url = 5; } // 视频字幕信息 @@ -218,46 +218,26 @@ message VideoSubtitle { // web端用户弹幕配置 message DanmuWebPlayerConfig { - // - bool dm_switch = 1; - // - bool ai_switch = 2 ; - // - int32 ai_level = 3 ; - // - bool blocktop = 4 ; - // - bool blockscroll = 5 ; - // - bool blockbottom = 6 ; - // - bool blockcolor = 7 ; - // - bool blockspecial = 8 ; - // - bool preventshade = 9 ; - // - bool dmask = 10 ; - // - float opacity = 11 ; - // - int32 dmarea = 12 ; - // - float speedplus = 13 ; - // - float fontsize = 14 ; - // - bool screensync = 15 ; - // - bool speedsync = 16 ; - // - string fontfamily = 17 ; - // - bool bold = 18 ; - // - int32 fontborder = 19 ; - // - string draw_type = 20 ; + bool dm_switch = 1; // 是否开启弹幕 + bool ai_switch = 2; // 是否开启智能云屏蔽 + int32 ai_level = 3; // 智能云屏蔽等级 + bool blocktop = 4; // 是否屏蔽顶端弹幕 + bool blockscroll = 5; // 是否屏蔽滚动弹幕 + bool blockbottom = 6; // 是否屏蔽底端弹幕 + bool blockcolor = 7; // 是否屏蔽彩色弹幕 + bool blockspecial = 8; // 是否屏蔽重复弹幕 + bool preventshade = 9; // + bool dmask = 10; // + float opacity = 11; // + int32 dmarea = 12; // + float speedplus = 13; // + float fontsize = 14; // 弹幕字号 + bool screensync = 15; // + bool speedsync = 16; // + string fontfamily = 17; // + bool bold = 18; // 是否使用加粗 + int32 fontborder = 19; // + string draw_type = 20; // 弹幕渲染类型 } // 单个字幕信息 @@ -265,13 +245,13 @@ message SubtitleItem { // 字幕id int64 id = 1; // 字幕id str - string idStr = 2; + string id_str = 2; // 字幕语言代码 string lan = 3; // 字幕语言 - string lanDoc = 4; + string lan_doc = 4; // 字幕文件url - string subtitleUrl = 5; + string subtitle_url = 5; // 字幕作者信息 UserInfo author = 6; } @@ -335,42 +315,24 @@ enum DMAttrBit { // 修改弹幕配置-请求 message DmPlayerConfigReq { - // - int64 ts = 1; - // 是否开启弹幕 - PlayerDanmakuSwitch switch = 2; - // 是否记录弹幕开关设置 - PlayerDanmakuSwitchSave switchSave = 3; - // 是否使用推荐弹幕设置 - PlayerDanmakuUseDefaultConfig useDefaultConfig = 4; - // 是否开启智能云屏蔽 - PlayerDanmakuAiRecommendedSwitch aiRecommendedSwitch = 5; - // 智能云屏蔽等级 - PlayerDanmakuAiRecommendedLevel aiRecommendedLevel = 6; - // 是否屏蔽顶端弹幕 - PlayerDanmakuBlocktop blocktop = 7; - // 是否屏蔽滚动弹幕 - PlayerDanmakuBlockscroll blockscroll = 8; - // 是否屏蔽底端弹幕 - PlayerDanmakuBlockbottom blockbottom = 9; - // 是否屏蔽彩色弹幕 - PlayerDanmakuBlockcolorful blockcolorful = 10; - // 是否屏蔽重复弹幕 - PlayerDanmakuBlockrepeat blockrepeat = 11; - // 是否屏蔽高级弹幕 - PlayerDanmakuBlockspecial blockspecial = 12; - // 弹幕不透明度 - PlayerDanmakuOpacity opacity = 13; - // 弹幕缩放比例 - PlayerDanmakuScalingfactor scalingfactor = 14; - // 弹幕显示区域 - PlayerDanmakuDomain domain = 15; - // 弹幕速度 - PlayerDanmakuSpeed speed = 16; - // 是否开启屏蔽列表 - PlayerDanmakuEnableblocklist enableblocklist = 17; - // 是否开启弹幕 - InlinePlayerDanmakuSwitch inlinePlayerDanmakuSwitch = 18; + int64 ts = 1; // + PlayerDanmakuSwitch switch = 2; // 是否开启弹幕 + PlayerDanmakuSwitchSave switch_save = 3; // 是否记录弹幕开关设置 + PlayerDanmakuUseDefaultConfig use_default_config = 4; // 是否使用推荐弹幕设置 + PlayerDanmakuAiRecommendedSwitch ai_recommended_switch = 5; // 是否开启智能云屏蔽 + PlayerDanmakuAiRecommendedLevel ai_recommended_level = 6; // 智能云屏蔽等级 + PlayerDanmakuBlocktop blocktop = 7; // 是否屏蔽顶端弹幕 + PlayerDanmakuBlockscroll blockscroll = 8; // 是否屏蔽滚动弹幕 + PlayerDanmakuBlockbottom blockbottom = 9; // 是否屏蔽底端弹幕 + PlayerDanmakuBlockcolorful blockcolorful = 10; // 是否屏蔽彩色弹幕 + PlayerDanmakuBlockrepeat blockrepeat = 11; // 是否屏蔽重复弹幕 + PlayerDanmakuBlockspecial blockspecial = 12; // 是否屏蔽高级弹幕 + PlayerDanmakuOpacity opacity = 13; // 弹幕不透明度 + PlayerDanmakuScalingfactor scalingfactor = 14; // 弹幕缩放比例 + PlayerDanmakuDomain domain = 15; // 弹幕显示区域 + PlayerDanmakuSpeed speed = 16; // 弹幕速度 + PlayerDanmakuEnableblocklist enableblocklist = 17; // 是否开启屏蔽列表 + InlinePlayerDanmakuSwitch inlinePlayerDanmakuSwitch = 18; // 是否开启弹幕 } // 修改弹幕配置-响应 @@ -408,83 +370,51 @@ message DanmakuAIFlag { // 弹幕配置信息 message DanmuPlayerViewConfig { // 弹幕默认配置 - DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1; + DanmuDefaultPlayerConfig danmuku_default_player_config = 1; // 弹幕用户配置 - DanmuPlayerConfig danmukuPlayerConfig = 2; + DanmuPlayerConfig danmuku_player_config = 2; // 弹幕显示区域自动配置列表 - repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3; + repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 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; + 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; // 是否开启弹幕 } // 弹幕配置 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; + 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; // } // 弹幕显示区域自动配置 @@ -492,11 +422,11 @@ message DanmuPlayerDynamicConfig { // 时间 int32 progress = 1; // 弹幕显示区域 - float playerDanmakuDomain = 2; + float player_danmaku_domain = 2; } // 是否开启弹幕 -message PlayerDanmakuSwitch {bool value = 1;} +message PlayerDanmakuSwitch {bool value = 1;bool canIgnore = 2;} // 是否记录弹幕开关设置 message PlayerDanmakuSwitchSave {bool value = 1;} // 是否使用推荐弹幕设置 diff --git a/grpc_api/bilibili/im/interfaces/inner-interface/v1/api.proto b/grpc_api/bilibili/im/interfaces/inner-interface/v1/api.proto new file mode 100644 index 0000000..535fead --- /dev/null +++ b/grpc_api/bilibili/im/interfaces/inner-interface/v1/api.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package bilibili.im.interface.inner.interface.v1; + +// +service InnerInterface { + // + rpc UpdateListInn(ReqOpBlacklist) returns(RspOpBlacklist); +} + +// +message BanUser { + // 用户mid + uint64 uid = 1; + // 封禁业务 + int32 limit = 2; + // 封禁时间 + int32 time = 3; + // 模式 + // 1:add 2:remove + int32 mode = 4; +} + +// +message ReqOpBlacklist { + // 需要封禁/解封的用户信息 + repeated BanUser ban_users = 1; +} + +// +message RspOpBlacklist { + // + repeated uint64 failed_users = 1; +} diff --git a/grpc_api/bilibili/im/interfaces/v1.proto b/grpc_api/bilibili/im/interfaces/v1.proto deleted file mode 100644 index 898324d..0000000 --- a/grpc_api/bilibili/im/interfaces/v1.proto +++ /dev/null @@ -1,440 +0,0 @@ -syntax = "proto3"; - -import "bilibili/im/type.proto"; - -package bilibili.im.interfaces.v1; - -//私信 -service ImInterface { - //未读私信数 - rpc singleUnread (ReqSingleUnread) returns (RspSingleUnread); - - //会话详情 - rpc sessionDetail (ReqSessionDetail) returns (bilibili.im.type.SessionInfo); - - //拉取会话记录列表 - rpc getSessions (ReqGetSessions) returns (RspSessions); - - //拉取最近私信分享列表 - rpc shareList (ReqShareList) returns (RspShareList); - - //发送消息 - rpc sendMsg (ReqSendMsg) returns (RspSendMsg); - - //删除会话记录 - rpc removeSession (ReqRemoveSession) returns (DummyRsp); - - //置顶聊天 - rpc setTop (ReqSetTop) returns (DummyRsp); - - // - rpc ackAssisMsg (ReqAckAssisMsg) returns (DummyRsp); - - // - rpc ackSessions (ReqAckSessions) returns (RspSessions); - - // - rpc batchRmSessions (ReqBatRmSess) returns (DummyRsp); - - // - rpc batchSessDetail (ReqSessionDetails) returns (RspSessionDetails); - - // - rpc getSpecificSessions (ReqGetSpecificSessions) returns (RspSessions); - - // - rpc groupAssisMsg (ReqGroupAssisMsg) returns (RspSessionMsg); - - // - rpc myGroupUnread (DummyReq) returns (RspMyGroupUnread); - - // - rpc newSessions (ReqNewSessions) returns (RspSessions); - - // - rpc specificSingleUnread (ReqSpecificSingleUnread) returns (RspSpecificSingleUnread); - - // - rpc syncAck (ReqSyncAck) returns (RspSyncAck); - - // - rpc syncFetchSessionMsgs (ReqSessionMsg) returns (RspSessionMsg); - - // - rpc syncRelation (ReqRelationSync) returns (RspRelationSync); - - // - rpc updateAck (ReqUpdateAck) returns (DummyRsp); - - // - rpc updateUnflwRead (DummyReq) returns (DummyRsp); -} - -//发送消息-请求 -message ReqSendMsg { - // - bilibili.im.type.Msg msg = 1; - - // - string cookie = 2; - - // - string cookie2 = 3; - - // - int32 errorCode = 4; - - // - string devId = 5; -} - -//发送消息-回复 -message RspSendMsg { - // - uint64 msgKey = 1; - - // - repeated EmotionInfo eInfos = 2; - - // - string msgContent = 3; -} - -//-请求 -message DummyReq { - // - uint32 idl = 1; -} - -//-回复 -message DummyRsp { - -} - -//-请求 -message ReqAckAssisMsg { - // - uint64 ackSeqno = 1; -} - -//-请求 -message ReqAckSessions { - // - uint64 beginTs = 1; - - // - uint32 endTs = 2; - - // - uint32 size = 3; -} - -//-请求 -message ReqBatRmSess { - -} - -//拉取会话记录列表-请求 -message ReqGetSessions { - // - uint64 beginTs = 1; - - // - uint64 endTs = 2; - - // - uint32 size = 3; - - // - uint32 sessionType = 4; - - // - uint32 unfollowFold = 5; - - // - uint32 groupFold = 6; - - // - uint32 sortRule = 7; - - // - uint32 teenagerMode = 8; - - // - uint32 lessonsMode = 9; -} - -//拉取会话记录列表-回复 -message RspSessions { - // - repeated bilibili.im.type.SessionInfo sessionList = 1; - - // - uint32 hasMore = 2; - - // - bool antiDisturbCleaning = 3; - - // - int32 isAddressListEmpty = 4; -} - -//-请求 -message ReqGetSpecificSessions { - // - repeated SimpleSession talkerSessions = 1; -} - -//-请求 -message ReqGroupAssisMsg { - // - uint64 clientSeqno = 1; - - // - uint32 size = 2; -} - -//-请求 -message ReqNewSessions { - // - uint64 beginTs = 1; - - // - uint32 size = 2; - - // - uint32 teenagerMode = 3; - - // - uint32 lessonsMode = 4; -} - -//-请求 -message ReqRelationSync { - // - uint64 clientRelationOplogSeqno = 1; -} - -//删除会话记录-请求 -message ReqRemoveSession { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; -} - -//会话详情-请求 -message ReqSessionDetail { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; - - // - uint64 uid = 3; -} - -//-请求 -message ReqSessionDetails { - // - repeated ReqSessionDetail sessIds = 1; -} - -//-请求 -message ReqSessionMsg { - // - uint64 talkerId = 1; - - // - int32 sessionType = 2; - - // - uint64 endSeqno = 3; - - // - uint64 beginSeqno = 4; - - // - int32 size = 5; - - // - int32 order = 6; - - // - string devId = 7; -} - -//置顶聊天-请求 -message ReqSetTop { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; - - // - uint32 opType = 3; -} - -//拉取最近私信分享列表-请求 -message ReqShareList { - // - int32 size = 1; -} - -//拉取最近私信分享列表-回复 -message RspShareList { - //最近会话列表 - repeated ShareSessionInfo sessionList = 1; - - // - int32 isAddressListEmpty = 2; -} - -//未读私信数-请求 -message ReqSingleUnread { - // - uint32 unreadType = 1; - - // - uint32 showUnfollowList = 2; -} - -//未读私信数-回复 -message RspSingleUnread { - //未关注用户私信数 - uint64 unfollowUnread = 1; - - //已关注用户私信数 - uint64 followUnread = 2; - - // - uint32 unfollowPushMsg = 3; -} - -//-请求 -message ReqSpecificSingleUnread { - // - repeated SimpleSession talkerSessions = 1; -} - -//-请求 -message ReqSyncAck { - // - uint64 clientSeqno = 1; -} - -//-请求 -message ReqUpdateAck { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; - - // - uint64 ackSeqno = 3; -} - -//-回复 -message RspMyGroupUnread { - // - uint32 unreadCount = 1; -} - -//-回复 -message RspRelationSync { - // - int32 full = 1; - - // - repeated bilibili.im.type.RelationLog relationLogs = 2; - - // - repeated bilibili.im.type.FriendRelation friendList = 3; - - // - uint64 serverRelationOplogSeqno = 4; - - // - repeated bilibili.im.type.GroupRelation groupList = 5; -} - -//-回复 -message RspSessionDetails { - // - repeated bilibili.im.type.SessionInfo sessInfos = 1; -} - -//-回复 -message RspSessionMsg { - // - repeated bilibili.im.type.Msg messages = 1; - - // - int32 hasMore = 2; - - // - uint64 minSeqno = 3; - - // - uint64 maxSeqno = 4; - - // - repeated EmotionInfo eInfos = 5; -} - -//-回复 -message RspSpecificSingleUnread { - // - map talkerUnreadCnt = 1; - - // - uint64 allUnreadCnt = 2; -} - -//-回复 -message RspSyncAck { - -} - -//会话信息,用于私信分享 -message ShareSessionInfo { - // - uint64 talkerId = 1; - - // - string talkerUname = 2; - - // - string talkerIcon = 3; - - // - int32 officialType = 4; -} - -// -message SimpleSession { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; -} - -// -message EmotionInfo { - // - string text = 1; - - // - string url = 2; - - // - int32 size = 3; - - // - string gifUrl = 4; -} \ No newline at end of file diff --git a/grpc_api/bilibili/im/interfaces/v1/im.proto b/grpc_api/bilibili/im/interfaces/v1/im.proto new file mode 100644 index 0000000..f1794f0 --- /dev/null +++ b/grpc_api/bilibili/im/interfaces/v1/im.proto @@ -0,0 +1,391 @@ +syntax = "proto3"; + +package bilibili.im.interfaces.v1; + +import "bilibili/im/type/im.proto"; + +//私信 +service ImInterface { + // 发送消息 + rpc SendMsg (ReqSendMsg) returns (RspSendMsg); + + // 同步关系 + rpc SyncRelation (ReqRelationSync) returns (RspRelationSync); + // 确认同步进度 + rpc SyncAck (ReqSyncAck) returns (RspSyncAck); + // 同步版本拉取消息 + rpc SyncFetchSessionMsgs (ReqSessionMsg) returns (RspSessionMsg); + + // 拉取会话记录列表 + rpc GetSessions (ReqGetSessions) returns (RspSessions); + // 拉取新消息 + rpc NewSessions (ReqNewSessions) returns (RspSessions); + // 拉取已读消息 + rpc AckSessions (ReqAckSessions) returns (RspSessions); + // 更新已读进度 + rpc UpdateAck (ReqUpdateAck) returns (DummyRsp); + // 置顶聊天 + rpc SetTop (ReqSetTop) returns (DummyRsp); + // 删除会话记录 + rpc RemoveSession (ReqRemoveSession) returns (DummyRsp); + // 未读私信数 + rpc SingleUnread (ReqSingleUnread) returns (RspSingleUnread); + // 我创建的应援团未读数 + rpc MyGroupUnread (DummyReq) returns (RspMyGroupUnread); + // 未关注的人批量设置为已读 + rpc UpdateUnflwRead (DummyReq) returns (DummyRsp); + // 应援团消息助手 + rpc GroupAssisMsg (ReqGroupAssisMsg) returns (RspSessionMsg); + // 更新应援团小助手消息已拉取进度 + rpc AckAssisMsg (ReqAckAssisMsg) returns (DummyRsp); + // 拉取会话详情 + rpc SessionDetail (ReqSessionDetail) returns (bilibili.im.type.SessionInfo); + // 批量拉取会话详情 + rpc BatchSessDetail (ReqSessionDetails) returns (RspSessionDetails); + // 批量删除会话 + rpc BatchRmSessions (ReqBatRmSess) returns (DummyRsp); + // 拉取最近私信分享列表 + rpc ShareList (ReqShareList) returns (RspShareList); + + // + rpc SpecificSingleUnread (ReqSpecificSingleUnread) returns (RspSpecificSingleUnread); + // + rpc GetSpecificSessions (ReqGetSpecificSessions) returns (RspSessions); +} + +// 发送消息-请求 +message ReqSendMsg { + // 消息内容 + bilibili.im.type.Msg msg = 1; + // + string cookie = 2; + // + string cookie2 = 3; + // + int32 error_code = 4; + // + string dev_id = 5; +} + +// 表情资源信息 +message EmotionInfo { + // 表情 + string text = 1; + // 表情url + string url = 2; + // 表情大小 + // 0:未知 1:min 2:max + int32 size = 3; + // gif url + string gif_url = 4; +} + +// 发送消息-响应 +message RspSendMsg { + // + uint64 msg_key = 1; + // 表情资源信息 + repeated EmotionInfo e_infos = 2; + // + string msg_content = 3; + // + bilibili.im.type.KeyHitInfos key_hit_infos = 4; +} + +// 同步关系-请求 +message ReqRelationSync { + // 客户端当前seqno + uint64 client_relation_oplog_seqno = 1; +} + +// 同步关系-响应 +message RspRelationSync { + // + int32 full = 1; + // 增量日志 + repeated bilibili.im.type.RelationLog relation_logs = 2; + // 全量列表 + repeated bilibili.im.type.FriendRelation friend_list = 3; + // 服务器端最大的relation seqno + uint64 server_relation_oplog_seqno = 4; + // 全量列表 + repeated bilibili.im.type.GroupRelation group_list = 5; +} + +// 确认同步进度-请求 +message ReqSyncAck { + // + uint64 client_seqno = 1; +} + +// 确认同步进度-响应 +message RspSyncAck {} + +// 同步版本拉取消息-请求 +message ReqSessionMsg { + // + uint64 talker_id = 1; + // + int32 session_type = 2; + // + uint64 end_seqno = 3; + // + uint64 begin_seqno = 4; + // + int32 size = 5; + // + int32 order = 6; + // + string dev_id = 7; +} + +// 同步版本拉取消息-响应 +message RspSessionMsg { + // + repeated bilibili.im.type.Msg messages = 1; + // + int32 has_more = 2; + // + uint64 min_seqno = 3; + // + uint64 max_seqno = 4; + // 表情资源信息 + repeated EmotionInfo e_infos = 5; +} + +// 拉取会话记录列表-请求 +message ReqGetSessions { + // + uint64 begin_ts = 1; + // + uint64 end_ts = 2; + // + uint32 size = 3; + // + uint32 session_type = 4; + // + uint32 unfollow_fold = 5; + // + uint32 group_fold = 6; + // + uint32 sort_rule = 7; + // 青少年模式 + uint32 teenager_mode = 8; + // 课堂模式 + uint32 lessons_mode = 9; +} + +// 拉取新消息-请求 +message ReqNewSessions { + // + uint64 begin_ts = 1; + // + uint32 size = 2; + // + uint32 teenager_mode = 3; + // 课堂模式 + uint32 lessons_mode = 4; +} + +// 拉取已读消息-请求 +message ReqAckSessions { + // + uint64 begin_ts = 1; + // + uint32 end_ts = 2; + // + uint32 size = 3; +} + +// 拉取消息-响应 +message RspSessions { + // + repeated bilibili.im.type.SessionInfo session_list = 1; + // + uint32 has_more = 2; + // 标记反垃圾会话是否在清理中 + bool anti_disturb_cleaning = 3; + // 当session_list为空时,会返回该字段用于判断通讯录是否为空,1表示空,0表示非空 + int32 is_address_list_empty = 4; +} + +// 更新已读进度-请求 +message ReqUpdateAck { + // 聊天对象uid,可以为用户id或者为群id + uint64 talker_id = 1; + // 会话类型 + uint32 session_type = 2; + // 已读的最大seqno + uint64 ack_seqno = 3; +} + +// 置顶聊天-请求 +message ReqSetTop { + // + uint64 talker_id = 1; + // + uint32 session_type = 2; + // + // 0:置顶 1:取消置顶 + uint32 op_type = 3; +} + +// 删除会话记录-请求 +message ReqRemoveSession { + // + uint64 talker_id = 1; + // + uint32 session_type = 2; +} + +// 空响应 +message DummyRsp { + reserved 1; +} + +// +enum SESSION_TYPE { // + UNKNOWN = 0; // + UN_FOLD_SESSION = 1; // + UN_FOLLOW_SINGLE_SESSION = 2; // + MY_GROUP_SESSION = 3; // + ALL_SESSION = 4; // +} + +// +enum ENUM_FOLD { + FOLD_NO = 0; // + FOLD_YES = 1; // + FOLD_UNKNOWN = 2; // +} + +// +enum ENUM_UNREAD_TYPE{ + UNREAD_TYPE_ALL = 0; // + UNREAD_TYPE_FOLLOW = 1; // + UNREAD_TYPE_UNFOLLOW = 2; // +} + +// 未读私信数-请求 +message ReqSingleUnread { + // + uint32 unread_type = 1; + // + uint32 show_unfollow_list = 2; +} + +// 未读私信数-响应 +message RspSingleUnread { + // 未关注用户私信数 + uint64 unfollow_unread = 1; + // 已关注用户私信数 + uint64 follow_unread = 2; + // 未关注人列表是否有新业务通知 + uint32 unfollow_push_msg = 3; +} + +// +message SimpleSession { + // 聊天对象uid,可以为用户id或者为群id + uint64 talker_id = 1; + // 会话类型 + uint32 session_type = 2; +} + +// -请求 +message ReqSpecificSingleUnread { + // 具体会话详情 + repeated SimpleSession talker_sessions = 1; +} + +// -响应 +message RspSpecificSingleUnread { + // key -> 用户uid, value ->未读数 + map talkerUnreadCnt = 1; + // 总未读数 + uint64 allUnreadCnt = 2; +} + +// -请求 +message ReqGetSpecificSessions { + // 具体会话详情 + repeated SimpleSession talker_sessions = 1; +} + +// 空请求 +message DummyReq { + // + uint32 idl = 1; +} + +// 我创建的应援团未读数-响应 +message RspMyGroupUnread { + // 未读消息数 + uint32 unread_count = 1; +} + +// 应援团消息助手-请求 +message ReqGroupAssisMsg { + // + uint64 client_seqno = 1; + // + uint32 size = 2; +} + +// 更新应援团小助手消息已拉取进度-请求 +message ReqAckAssisMsg { + // + uint64 ack_seqno = 1; +} + +// 拉取会话详情-请求 +message ReqSessionDetail { + // + uint64 talker_id = 1; + // + uint32 session_type = 2; + // + uint64 uid = 3; +} + +// 批量拉取会话详情-请求 +message ReqSessionDetails { + // 会话详情请求列表 + repeated ReqSessionDetail sess_ids = 1; +} + +// 批量拉取会话详情-响应 +message RspSessionDetails { + // 会话详情列表 + repeated bilibili.im.type.SessionInfo sess_infos = 1; +} + +// 批量删除会话-请求 +message ReqBatRmSess {} + +// 拉取最近私信分享列表-请求 +message ReqShareList { + // 分页大小 最大20 + int32 size = 1; +} + +// 会话信息,用于私信分享 +message ShareSessionInfo { + // + uint64 talker_id = 1; + // + string talker_uname = 2; + // + string talker_icon = 3; + // 认证信息 + // -1: 无认证 0:个人认证 1:机构认证 + int32 official_type = 4; +} + +// 拉取最近私信分享列表-响应 +message RspShareList { + // 最近会话列表 + repeated ShareSessionInfo session_list = 1; + // + int32 IsAddressListEmpty = 2; +} diff --git a/grpc_api/bilibili/im/type.proto b/grpc_api/bilibili/im/type.proto deleted file mode 100644 index ac3c3a6..0000000 --- a/grpc_api/bilibili/im/type.proto +++ /dev/null @@ -1,244 +0,0 @@ -syntax = "proto3"; - -package bilibili.im.type; - -//消息类型 -enum MsgType { - //基础消息类型 - EN_INVALID_MSG_TYPE = 0; //空空的~ - EN_MSG_TYPE_TEXT = 1; //文本消息 - EN_MSG_TYPE_PIC = 2; //图片消息 - EN_MSG_TYPE_AUDIO = 3; //语音消息 - EN_MSG_TYPE_SHARE = 4; //分享消息 - EN_MSG_TYPE_DRAW_BACK = 5; //撤回消息 - EN_MSG_TYPE_CUSTOM_FACE = 6; //自定义表情 - EN_MSG_TYPE_SHARE_V2 = 7; //分享v2消息 - EN_MSG_TYPE_SYS_CANCEL = 8; //系统撤销 - EN_MSG_TYPE_MINI_PROGRAM = 9; //小程序 - //扩展消息类型 - EN_MSG_TYPE_NOTIFY_MSG = 10; //业务通知 - EN_MSG_TYPE_VIDEO_CARD = 11; //视频卡片 - EN_MSG_TYPE_ARTICLE_CARD = 12; //专栏卡片 - EN_MSG_TYPE_PICTURE_CARD = 13; //图片卡 - EN_MSG_TYPE_COMMON_SHARE_CARD = 14; //异形卡 - EN_MSG_TYPE_BIZ_MSG_TYPE = 50; // - //功能类系统消息类型 - EN_MSG_TYPE_GROUP_MEMBER_CHANGED = 101; //群成员变更 - EN_MSG_TYPE_GROUP_STATUS_CHANGED = 102; //群状态变更 - EN_MSG_TYPE_GROUP_DYNAMIC_CHANGED = 103; //群动态变更 - EN_MSG_TYPE_GROUP_LIST_CHANGED = 104; //群列表变更 - EM_MSG_TYPE_FRIEND_LIST_CHANGED = 105; //好友列表变更 - EN_MSG_TYPE_GROUP_DETAIL_CHANGED = 106; //群详情发生变化 - EN_MSG_TYPE_GROUP_MEMBER_ROLE_CHANGED = 107; //群成员角色发生变化 - EN_MSG_TYPE_NOTICE_WATCH_LIST = 108; // - EN_MSG_TYPE_NOTIFY_NEW_REPLY_RECIEVED = 109; //消息系统,收到新的reply - EN_MSG_TYPE_NOTIFY_NEW_AT_RECIEVED = 110; // - EN_MSG_TYPE_NOTIFY_NEW_PRAISE_RECIEVED = 111; // - EN_MSG_TYPE_NOTIFY_NEW_UP_RECIEVED = 112; // - EN_MSG_TYPE_NOTIFY_NEW_REPLY_RECIEVED_V2 = 113; // - EN_MSG_TYPE_NOTIFY_NEW_AT_RECIEVED_V2 = 114; // - EN_MSG_TYPE_NOTIFY_NEW_PRAISE_RECIEVED_V2 = 115; // - EN_MSG_TYPE_GROUP_DETAIL_CHANGED_MULTI = 116; //群详情发生变化,多端同步版本需要即时消息,无需落地 - EN_MSG_TYPE_GROUP_MEMBER_ROLE_CHANGED_MULTI = 117; //群成员角色发生变化,多端同步版本需要即时消息,无需落地 - EN_MSG_TYPE_NOTIFY_ANTI_DISTURB = 118; // - //系统通知栏消息类型 - EN_MSG_TYPE_SYS_GROUP_DISSOLVED = 201; //群解散 - EN_MSG_TYPE_SYS_GROUP_JOINED = 202; //入群 - EN_MSG_TYPE_SYS_GROUP_MEMBER_EXITED = 203; //成员主动退群 - EN_MSG_TYPE_SYS_GROUP_ADMIN_FIRED = 204; //房管被撤 - EN_MSG_TYPE_SYS_GROUP_MEMBER_KICKED = 205; //成员被T - EN_MSG_TYPE_SYS_GROUP_ADMIN_KICK_OFF = 206; //管理T人 - EN_MSG_TYPE_SYS_GROUP_ADMIN_DUTY = 207; //管理上任 - EN_MSG_TYPE_SYS_GROUP_AUTO_CREATED = 208; //自动创建 - EN_MSG_TYPE_SYS_FRIEND_APPLY = 210; //好友申请 - EN_MSG_TYPE_SYS_FRIEND_APPLY_ACK = 211; //好友申请通过 - EN_MSG_TYPE_SYS_GROUP_APPLY_FOR_JOINING = 212; //用户加群申请 - EN_MSG_TYPE_SYS_GROUP_ADMIN_ACCEPTED_USER_APPLY = 213; //通知管理员,有其他管理员已经同意用户加群 - //聊天窗口通知消息类型 - EN_MSG_TYPE_CHAT_MEMBER_JOINED = 301; //入群 - EN_MSG_TYPE_CHAT_MEMBER_EXITED = 302; //退群 - EN_MSG_TYPE_CHAT_GROUP_FREEZED = 303; //冻结 - EN_MSG_TYPE_CHAT_GROUP_DISSOLVED = 304; //解散 - EN_MSG_TYPE_CHAT_GROUP_CREATED = 305; //开通应援团 - EN_MSG_TYPE_CHAT_POPUP_SESSION = 306; //弹出会话 -} - -// -message SessionInfo { - // - uint64 talkerId = 1; - - // - uint32 sessionType = 2; - - // - uint64 atSeqno = 3; - - // - uint64 topTs = 4; - - // - string groupName = 5; - - // - string groupCover = 6; - - // - uint32 isFollow = 7; - - // - uint32 isDnd = 8; - - // - uint64 ackSeqno = 9; - - // - uint64 ackTs = 10; - - // - uint64 sessionTs = 11; - - // - uint32 unreadCount = 12; - - // - Msg lastMsg = 13; - - // - uint32 groupType = 14; - - // - uint32 canFold = 15; - - // - uint32 status = 16; - - // - uint64 maxSeqno = 17; - - // - uint32 newPushMsg = 18; - - // - uint32 setting = 19; - - // - uint32 isGuardian = 20; -} - -// -message Msg { - // - uint64 senderUid = 1; - - // - int32 receiverType = 2; - - // - uint64 receiverId = 3; - - // - uint64 cliMsgId = 4; - - // - int32 msgType = 5; - - // - string content = 6; - - // - uint64 msgSeqno = 7; - - // - uint64 timestamp = 8; - - // - repeated uint64 atUids = 9; - - // - repeated uint64 recverIds = 10; - - // - uint64 msgKey = 11; - - // - uint32 msgStatus = 12; - - // - bool sysCancel = 13; - - // - string notifyCode = 14; - - // - uint32 msgSource = 15; - - // - int32 newFaceVersion = 16; -} - -// -message RelationLog { - // - int32 logType = 1; - - // - uint64 oplogSeqno = 2; - - // - FriendRelation friendRelation = 3; - - // - GroupRelation groupRelation = 4; -} - -// -message FriendRelation { - // - uint64 uid = 1; - - // - string userName = 2; - - // - string face = 3; - - // - uint32 vipLevel = 4; -} - -// -message GroupRelation { - // - uint64 groupId = 1; - - // - uint64 ownerUid = 2; - - // - uint32 groupType = 3; - - // - uint32 groupLevel = 4; - - // - string groupCover = 5; - - // - string groupName = 6; - - // - string groupNotice = 7; - - // - int32 status = 8; - - // - int32 memberRole = 9; - - // - string fansMedalName = 10; - - // - uint64 roomId = 11; -} \ No newline at end of file diff --git a/grpc_api/bilibili/im/type/im.proto b/grpc_api/bilibili/im/type/im.proto new file mode 100644 index 0000000..1eac65f --- /dev/null +++ b/grpc_api/bilibili/im/type/im.proto @@ -0,0 +1,323 @@ +syntax = "proto3"; + +package bilibili.im.type; + +// +enum ENUM_BIZ_MSG_TYPE { + // + BIZ_MSG_TYPE_NORMAL = 0; + // + BIZ_MSG_TYPE_CARD_VIDEO = 1; +} + +// +enum RecverType{ + // + EN_NO_MEANING = 0; + //单人 + EN_RECVER_TYPE_PEER = 1; + //群 + EN_RECVER_TYPE_GROUP = 2; + //多人 + EN_RECVER_TYPE_PEERS = 3; +} + +// +enum CmdId { + EN_CMD_ID_INVALID = 0; //非法cmd + + //msg_svr + EN_CMD_ID_SEND_MSG = 200001; // 发消息 + + //sync_msg_svr + EN_CMD_ID_SYNC_MSG = 500001; // 同步消息 + EN_CMD_ID_SYNC_RELATION = 500002; // 同步相关链 + EN_CMD_ID_SYNC_ACK = 500003; // 客户端同步消息完成后,向服务器确认同步进度 + EN_CMD_ID_SYNC_FETCH_SESSION_MSGS = 500006; // 多端同步版本拉取消息 + + //session_svr + EN_CMD_ID_SESSION_SVR_GET_SESSIONS = 1000001; // 拉会话列表 + EN_CMD_ID_SESSION_SVR_NEW_SESSIONS = 1000002; // 新消息到达时获取会话列表 + EN_CMD_ID_SESSION_SVR_ACK_SESSIONS = 1000003; // 获取已读位置有更新的会话列表 + EN_CMD_ID_SESSION_SVR_UPDATE_ACK = 1000004; // 更新已读进度 + EN_CMD_ID_SESSION_SVR_SET_TOP = 1000005; // 置顶/取消置顶 + EN_CMD_ID_SESSION_SVR_REMOVE_SESSION = 1000007; // 删除会话 + EN_CMD_ID_SESSION_SVR_SINGLE_UNREAD = 1000008; // 单聊未读信息数 + EN_CMD_ID_SESSION_SVR_MY_GROUP_UNREAD = 1000009; // 我创建的应援团未读数 + EN_CMD_ID_SESSION_SVR_UPDATE_UNFLW_READ = 1000010; // 未关注的人批量设置为已读 + EN_CMD_ID_SESSION_SVR_GROUP_ASSIS_MSG = 1000011; // 应援团消息助手 + EN_CMD_ID_SESSION_SVR_ACK_ASSIS_MSG = 1000012; // 更新应援团小助手消息已拉取进度 + EN_CMD_ID_SESSION_SVR_SESSION_DETAIL = 1000015; // 拉会话详情 + EN_CMD_ID_SESSION_SVR_BATCH_SESS_DETAIL = 1000016; // 批量拉会话详情 + EN_CMD_ID_SESSION_SVR_BATCH_RM_SESSIONS = 1000017; // 批量删除会话 +} + +// +enum RelationLogType { + EN_INVALID_LOG_TYPE = 0; // + EN_ADD_FRIEND = 1; // 添加好友 + EN_REMOVE_FRIEND = 2; // 删除好友 + EN_JOIN_GROUP = 3; // 加入群 + EN_EXIT_GROUP = 4; // 退出群 +} + +// +enum MsgSource { + EN_MSG_SOURCE_UNKONW = 0; // + EN_MSG_SOURCE_IOS = 1; // + EN_MSG_SOURCE_ANDRIOD = 2; // + EN_MSG_SOURCE_H5 = 3; // + EN_MSG_SOURCE_PC = 4; // + EN_MSG_SOURCE_BACKSTAGE = 5; // + EN_MSG_SOURCE_BIZ = 6; // + EN_MSG_SOURCE_WEB = 7; // + EN_MSG_SOURCE_AUTOREPLY_BY_FOLLOWED=8; // + EN_MSG_SOURCE_AUTOREPLY_BY_RECEIVE_MSG = 9; // + EN_MSG_SOURCE_AUTOREPLY_BY_KEYWORDS = 10; // + EN_MSG_SOURCE_AUTOREPLY_BY_VOYAGE = 11; // + EN_MSG_SOURCE_VC_ATTACH_MSG = 12; // +}; + +//消息类型 +enum MsgType { + // 基础消息类型 + EN_INVALID_MSG_TYPE = 0; // 空空的~ + EN_MSG_TYPE_TEXT = 1; // 文本消息 + EN_MSG_TYPE_PIC = 2; // 图片消息 + EN_MSG_TYPE_AUDIO = 3; // 语音消息 + EN_MSG_TYPE_SHARE = 4; // 分享消息 + EN_MSG_TYPE_DRAW_BACK = 5; // 撤回消息 + EN_MSG_TYPE_CUSTOM_FACE = 6; // 自定义表情 + EN_MSG_TYPE_SHARE_V2 = 7; // 分享v2消息 + EN_MSG_TYPE_SYS_CANCEL = 8; // 系统撤销 + EN_MSG_TYPE_MINI_PROGRAM = 9; // 小程序 + + // 扩展消息类型 + EN_MSG_TYPE_NOTIFY_MSG = 10; // 业务通知 + EN_MSG_TYPE_VIDEO_CARD = 11; // 视频卡片 + EN_MSG_TYPE_ARTICLE_CARD = 12; // 专栏卡片 + EN_MSG_TYPE_PICTURE_CARD = 13; // 图片卡 + EN_MSG_TYPE_COMMON_SHARE_CARD = 14; // 异形卡 + EN_MSG_TYPE_BIZ_MSG_TYPE = 50; // + + // 功能类系统消息类型 + EN_MSG_TYPE_GROUP_MEMBER_CHANGED = 101; // 群成员变更 + EN_MSG_TYPE_GROUP_STATUS_CHANGED = 102; // 群状态变更 + EN_MSG_TYPE_GROUP_DYNAMIC_CHANGED = 103; // 群动态变更 + EN_MSG_TYPE_GROUP_LIST_CHANGED = 104; // 群列表变更 + EM_MSG_TYPE_FRIEND_LIST_CHANGED = 105; // 好友列表变更 + EN_MSG_TYPE_GROUP_DETAIL_CHANGED = 106; // 群详情发生变化 + EN_MSG_TYPE_GROUP_MEMBER_ROLE_CHANGED = 107; // 群成员角色发生变化 + EN_MSG_TYPE_NOTICE_WATCH_LIST = 108; // + EN_MSG_TYPE_NOTIFY_NEW_REPLY_RECIEVED = 109; // 消息系统,收到新的reply + EN_MSG_TYPE_NOTIFY_NEW_AT_RECIEVED = 110; // + EN_MSG_TYPE_NOTIFY_NEW_PRAISE_RECIEVED = 111; // + EN_MSG_TYPE_NOTIFY_NEW_UP_RECIEVED = 112; // + EN_MSG_TYPE_NOTIFY_NEW_REPLY_RECIEVED_V2 = 113; // + EN_MSG_TYPE_NOTIFY_NEW_AT_RECIEVED_V2 = 114; // + EN_MSG_TYPE_NOTIFY_NEW_PRAISE_RECIEVED_V2 = 115; // + EN_MSG_TYPE_GROUP_DETAIL_CHANGED_MULTI = 116; // 群详情发生变化,多端同步版本需要即时消息,无需落地 + EN_MSG_TYPE_GROUP_MEMBER_ROLE_CHANGED_MULTI = 117; // 群成员角色发生变化,多端同步版本需要即时消息,无需落地 + EN_MSG_TYPE_NOTIFY_ANTI_DISTURB = 118; // + + // 系统通知栏消息类型 + EN_MSG_TYPE_SYS_GROUP_DISSOLVED = 201; // 群解散 + EN_MSG_TYPE_SYS_GROUP_JOINED = 202; // 入群 + EN_MSG_TYPE_SYS_GROUP_MEMBER_EXITED = 203; // 成员主动退群 + EN_MSG_TYPE_SYS_GROUP_ADMIN_FIRED = 204; // 房管被撤 + EN_MSG_TYPE_SYS_GROUP_MEMBER_KICKED = 205; // 成员被T + EN_MSG_TYPE_SYS_GROUP_ADMIN_KICK_OFF = 206; // 管理T人 + EN_MSG_TYPE_SYS_GROUP_ADMIN_DUTY = 207; // 管理上任 + EN_MSG_TYPE_SYS_GROUP_AUTO_CREATED = 208; // 自动创建 + EN_MSG_TYPE_SYS_FRIEND_APPLY = 210; // 好友申请 + EN_MSG_TYPE_SYS_FRIEND_APPLY_ACK = 211; // 好友申请通过 + EN_MSG_TYPE_SYS_GROUP_APPLY_FOR_JOINING = 212; // 用户加群申请 + EN_MSG_TYPE_SYS_GROUP_ADMIN_ACCEPTED_USER_APPLY = 213; // 通知管理员,有其他管理员已经同意用户加群 + + // 聊天窗口通知消息类型 + EN_MSG_TYPE_CHAT_MEMBER_JOINED = 301; // 入群 + EN_MSG_TYPE_CHAT_MEMBER_EXITED = 302; // 退群 + EN_MSG_TYPE_CHAT_GROUP_FREEZED = 303; // 冻结 + EN_MSG_TYPE_CHAT_GROUP_DISSOLVED = 304; // 解散 + EN_MSG_TYPE_CHAT_GROUP_CREATED = 305; // 开通应援团 + EN_MSG_TYPE_CHAT_POPUP_SESSION = 306; // 弹出会话 +} + +// +enum SESSION_TYPE { + INVALID_SESSION_TYPE = 0; // + UN_FOLD_SESSION = 1; // + UN_FOLLOW_SINGLE_SESSION = 2; // + MY_GROUP_SESSION = 3; // + ALL_SESSION = 4; // +} + +// 关键词高亮文本 +message HighText { + // + string title = 1; + // + string url = 2; + // 表示高亮文本应该高亮第几个匹配的文本,ps:比如,“有疑问请联系客服,联系客服时,请说明具体的情况”,一共有2个匹配的文本,要高亮第一个匹配的,则index=1 + uint32 index = 3; +} + +//关键词命中信息 +message KeyHitInfos { + // + string toast = 1; + // + uint32 rule_id = 2; + // + repeated HighText high_text = 3; + // +} + +// +message Msg { + // 发送方mid + uint64 sender_uid = 1; + // 接收方类型 + int32 receiver_type = 2; + // 接收方mid + uint64 receiver_id = 3; + // 客户端的序列id,用于服务端去重 + uint64 cli_msg_id = 4; + // 消息类型 + int32 msg_type = 5; + // 消息内容 + string content = 6; + // 服务端的序列号x + uint64 msg_seqno = 7; + // 消息发送时间(服务端时间) + uint64 timestamp = 8; + // @用户列表 + repeated uint64 at_uids = 9; + // 多人消息 + repeated uint64 recver_ids = 10; + // 消息唯一标示 + uint64 msg_key = 11; + // 消息状态 + uint32 msg_status = 12; + // 是否为系统撤销 + bool sys_cancel = 13; + // 通知码 + string notify_code = 14; + // 消息来源 + uint32 msg_source = 15; + // 如果msg.content有表情字符,则该参数需要置为1 + int32 new_face_version = 16; + // 命中关键词信息 + KeyHitInfos key_hit_infos = 17; +} + +// 会话详情 +message SessionInfo { + // + uint64 talker_id = 1; + // + uint32 session_type = 2; + // + uint64 at_seqno = 3; + // + uint64 top_ts = 4; + // + string group_name = 5; + // + string group_cover = 6; + // + uint32 is_follow = 7; + // + uint32 is_dnd = 8; + // + uint64 ack_seqno = 9; + // + uint64 ack_ts = 10; + // + uint64 session_ts = 11; + // + uint32 unread_count = 12; + // + Msg last_msg = 13; + // + uint32 group_type = 14; + // + uint32 can_fold = 15; + // + uint32 status = 16; + // + uint64 max_seqno = 17; + // 会话是否有业务通知 + uint32 new_push_msg = 18; + // 接收方是否设置接受推送 + uint32 setting = 19; + // + uint32 is_guardian = 20; +} + +// +message RelationLog { + // 操作类型 + int32 log_type = 1; + // 操作seqno + uint64 oplog_seqno = 2; + // 好友信息 + FriendRelation friend_relation = 3; + // 群信息 + GroupRelation group_relation = 4; +} + +// +message FriendRelation { + // 用户mid + uint64 uid = 1; + // 用户昵称 + string user_name = 2; + // 头像url + string face = 3; + // vip类型 + // 0:无 1:月度大会员 2:年度大会员 + uint32 vip_level = 4; +} + +// +message ImgInfo{ + // + string url = 1; + // + int32 width = 2; + // + int32 height = 3; + // + string imageType = 4; +} + +// +message GroupRelation { + // + uint64 group_id = 1; + // + uint64 owner_uid = 2; + // + uint32 group_type = 3; + // + uint32 group_level = 4; + // + string group_cover = 5; + // + string group_name = 6; + // + string group_notice = 7; + // + int32 status = 8; + // + int32 member_role = 9; + // + string fans_medal_name = 10; + // + uint64 room_id = 11; +} + + + + diff --git a/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto b/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto new file mode 100644 index 0000000..d63ce5d --- /dev/null +++ b/grpc_api/bilibili/main/common/arch/doll/v1/doll.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; + +package bilibili.main.common.arch.doll.v1; + +// +service Echo { + // + rpc Ping(PingRequest) returns(PingResponse); + // + rpc Say(SayRequest) returns(SayResponse); + // + rpc Error(ErrorRequest) returns(ErrorResponse); +} + +// +message PingRequest { + / + int64 time = 1; +} + +// +message PingResponse { + // + string host = 1; + // + int64 time = 3; +} + +// +message SayRequest { + // + string content = 1; +} + +// +message SayResponse { + // + string host = 1; + // + string content = 2; + // + int64 time = 3; +} + +// +message ErrorRequest { + // + int32 error = 2; + // + int64 time = 1; + // + int64 delay = 3; +} + +// +message ErrorResponse { + // + string host = 1; + // + int64 time = 3; +} diff --git a/grpc_api/bilibili/main/community/reply/v1/reply.proto b/grpc_api/bilibili/main/community/reply/v1/reply.proto index b6ad38f..e2ccf3f 100644 --- a/grpc_api/bilibili/main/community/reply/v1/reply.proto +++ b/grpc_api/bilibili/main/community/reply/v1/reply.proto @@ -22,8 +22,8 @@ service Reply { // 广告 message CM { - // 广告数据(需要二次解包) - google.protobuf.Any sourceContent = 1; + // 广告数据(需要解包) + google.protobuf.Any source_content = 1; } // 对话评论树-请求 @@ -45,7 +45,7 @@ message DialogListReply { // 页面游标 CursorReply cursor = 1; // 评论区显示控制字段 - SubjectControl subjectControl = 2; + SubjectControl subject_control = 2; // 子评论列表 repeated ReplyInfo replies = 3; // 评论区的活动 @@ -54,10 +54,8 @@ message DialogListReply { // 来源标识 enum DetailListScene { - //评论区展开 - REPLY = 0; - //回复消息推送 - MSG_FEED = 1; + REPLY = 0; // 评论区展开 + MSG_FEED = 1; // 回复消息推送 } // 二级评论明细-请求 @@ -81,7 +79,7 @@ message DetailListReply { // 页面游标 CursorReply cursor = 1; // 评论区显示控制字段 - SubjectControl subjectControl = 2; + SubjectControl subject_control = 2; // 根评论信息(带二级评论) ReplyInfo root = 3; // 评论区的活动 @@ -99,7 +97,7 @@ message MainListReq { // 扩展数据json string extra = 4; // 广告扩展json - string adExtra = 5; + string ad_extra = 5; // 目标评论rpid int64 rpid = 6; } @@ -133,13 +131,13 @@ message PreviewListReply { // 评论列表 repeated ReplyInfo replies = 2; // 评论区显示控制字段 - SubjectControl subjectControl = 3; + SubjectControl subject_control = 3; // UP置顶评论 ReplyInfo upTop = 4; // 管理员置顶评论 - ReplyInfo adminTop = 5; + ReplyInfo admin_top = 5; // 投票置顶评论 - ReplyInfo voteTop = 6; + ReplyInfo vote_top = 6; } // 主评论列表-响应 @@ -149,13 +147,13 @@ message MainListReply { // 评论列表 repeated ReplyInfo replies = 2; // 评论区显示控制字段 - SubjectControl subjectControl = 3; + SubjectControl subject_control = 3; // UP置顶评论 - ReplyInfo upTop = 4; + ReplyInfo up_top = 4; // 管理员置顶评论 - ReplyInfo adminTop = 5; + ReplyInfo admin_top = 5; // 投票置顶评论 - ReplyInfo voteTop = 6; + ReplyInfo vote_top = 6; // 评论区提示 Notice notice = 7; // 抽奖评论 @@ -163,7 +161,7 @@ message MainListReply { // 活动 Activity activity = 9; // 精选评论区筛选后台信息 - UpSelection upSelection = 10; + UpSelection up_selection = 10; // 广告 CM cm = 11; // 特效 @@ -179,9 +177,9 @@ message Effects { // message UpSelection { // 待审评论数 - int64 pendingCount = 1; + int64 pending_count = 1; // 忽略评论数 - int64 ignoreCount = 2; + int64 ignore_count = 2; } // @@ -197,25 +195,25 @@ message Notice { // 活动 message Activity { // 活动id - int64 activityId = 1; + int64 activity_id = 1; // 活动状态 // -1:待审 1:上线 - int64 activityState = 2; + int64 activity_state = 2; // 参与活动的输入框文案 - string activityPlaceholder = 3; + string activity_placeholder = 3; } // 抽奖 message Lottery { // 抽奖id - int64 lotteryId = 1; + int64 lottery_id = 1; // 抽奖状态 // 0:未开奖 1:开奖中 2:已开奖 - int64 lotteryStatus = 2; + int64 lottery_status = 2; // 抽奖人mid - int64 lotteryMid = 3; + int64 lottery_mid = 3; // 开奖时间 - int64 lotteryTime = 4; + int64 lottery_time = 4; // int64 oid = 5; // @@ -227,19 +225,15 @@ message Lottery { // 用户信息 Member member = 9; // 评论条目控制字段 - ReplyControl replyControl = 10; + ReplyControl reply_control = 10; } // 排序方式 enum Mode { - // - DEFAULT = 0; - // - UNSPECIFIED = 1; - //按时间 - MAIN_LIST_TIME = 2; - //按热度 - MAIN_LIST_HOT = 3; + DEFAULT = 0; // + UNSPECIFIED = 1; // 默认排序 + MAIN_LIST_TIME = 2; // 按时间 + MAIN_LIST_HOT = 3; // 按热度 } // 页面游标请求 @@ -272,35 +266,35 @@ message CursorReply { // 评论区控制字段 message SubjectControl { // UP主mid - int64 upMid = 1; + int64 up_mid = 1; // 自己是否为协管 - bool isAssist = 2; + bool is_assist = 2; // 是否只读 - bool readOnly = 3; + bool read_only = 3; // 是否有发起投票权限 - bool hasVoteAccess = 4; + bool has_vote_access = 4; // 是否有发起抽奖权限 - bool hasLotteryAccess = 5; + bool has_lottery_access = 5; // 是否有被折叠评论 - bool hasFoldedReply = 6; + bool has_folded_reply = 6; // 空评论区背景文案 - string bgText = 7; + string bg_text = 7; // 是否被UP拉黑 - bool upBlocked = 8; + bool up_blocked = 8; // 是否有发起活动权限 - bool hasActivityAccess = 9; + bool has_activity_access = 9; // 标题展示控制 - bool showTitle = 10; + bool show_title = 10; // 是否显示UP主操作标志 - bool showUpAction = 11; + bool show_up_action = 11; // 是否显示评论区排序切换按钮 - int64 switcherType = 12; + int64 switcher_type = 12; // 是否禁止输入框 - bool inputDisable = 13; + bool input_disable = 13; // 根评论输入框背景文案 - string rootText = 14; + string root_text = 14; // 子评论输入框背景文案 - string childText = 15; + string child_text = 15; // 评论总数 int64 count = 16; // 评论区标题 @@ -338,7 +332,7 @@ message ReplyInfo { // 发布者信息 Member member = 13; // 评论控制字段 - ReplyControl replyControl = 14; + ReplyControl reply_control = 14; } //评论主体信息 @@ -363,15 +357,15 @@ message ReplyControl { // 0:无 1:已点赞 2:已点踩 int64 action = 1; // 是否UP觉得很赞 - bool upLike = 2; + bool up_like = 2; // 是否存在UP回复 - bool upReply = 3; + bool up_reply = 3; // 是否显示关注按钮 - bool showFollowBtn = 4; + bool show_follow_btn = 4; // 是否协管 - bool isAssist = 5; + bool is_assist = 5; // 是否展示标签 - string labelText = 6; + string label_text = 6; // 是否关注 bool following = 7; // 是否粉丝 @@ -379,17 +373,17 @@ message ReplyControl { // 是否被自己拉黑 bool blocked = 9; // 是否存在折叠的二级评论 - bool hasFoldedReply = 10; + bool has_folded_reply = 10; // 是否折叠 - bool isFoldedReply = 11; + bool is_folded_reply = 11; // 是否UP置顶 - bool isUpTop = 12; + bool is_up_top = 12; // 是否管理置顶 - bool isAdminTop = 13; + bool is_admin_top = 13; // 是否置顶投票评论 - bool isVoteTop = 14; + bool is_vote_top = 14; // 最大收起显示行数 - int64 maxLine = 15; + int64 max_line = 15; // 该条评论可不可见 bool invisible = 16; // 是否和up签订契约 @@ -405,15 +399,19 @@ message Url { // int64 state = 2; // 图标url - string prefixIcon = 3; + string prefix_icon = 3; // - string appUrlSchema = 4; + string app_url_schema = 4; // - string appName = 5; + string app_name = 5; // - string appPackageName = 6; + string app_package_name = 6; // 上报id - string clickReport = 7; + string click_report = 7; + // + bool is_half_screen = 8; + // + string exposure_report = 9; } // 话题项 @@ -457,39 +455,39 @@ message Member { // 等级 int64 level = 5; // 认证类型 - int64 officialVerifyType = 6; + int64 official_verify_type = 6; /**********VIP相关**********/ // 会员类型 // 0:不是大会员 1:月度会员 2:年度大会员 - int64 vipType = 7; + int64 vip_type = 7; // 会员状态 - int64 vipStatus = 8; + int64 vip_status = 8; // 会员样式 - int64 vipThemeType = 9; + int64 vip_theme_type = 9; // 会员铭牌样式url - string vipLabelPath = 10; + string vip_label_path = 10; /**********装扮相关**********/ // 头像框url - string garbPendantImage = 11; + string garb_pendant_image = 11; // 装扮卡url - string garbCardImage = 12; + string garb_card_image = 12; // 有关注按钮时的装扮卡url - string garbCardImageWithFocus = 13; + string garb_card_image_with_focus = 13; // 专属装扮页面url - string garbCardJumpUrl = 14; + string garb_card_jump_url = 14; // 专属装扮id - string garbCardNumber = 15; + string garb_card_number = 15; // 专属装扮id显示颜色 - string garbCardFanColor = 16; + string garb_card_fan_color = 16; // 是否为专属装扮卡 - bool garbCardIsFan = 17; + bool garb_card_is_fan = 17; /**********粉丝勋章相关**********/ // 粉丝勋章名 - string fansMedalName = 18; + string fans_medal_name = 18; // 粉丝勋章等级 - int64 fansMedalLevel = 19; + int64 fans_medal_level = 19; // 粉丝勋章显示颜色 - int64 fansMedalColor = 20; + int64 fans_medal_color = 20; // 会员昵称颜色 string vip_nickname_color = 21; // 会员角标 @@ -503,22 +501,16 @@ message Member { // enum SearchItemType { - // - DEFAULT_ITEM_TYPE = 0; - // - GOODS_VALUE = 1; - // - VIDEO_VALUE = 2; - // - ARTICLE_VALUE = 3; + DEFAULT_ITEM_TYPE = 0; // + GOODS_VALUE = 1; // + VIDEO_VALUE = 2; // + ARTICLE_VALUE = 3; // } // enum SearchItemVideoSubType { - // - UGC = 0; - // - PGC = 1; + UGC = 0; // + PGC = 1; // } // 评论搜索item前置发布-请求 @@ -532,11 +524,11 @@ message SearchItemPreHookReq { // 评论搜索item前置发布-响应 message SearchItemPreHookReply { // 输入框的文案 - string placeholderText = 1; + string placeholder_text = 1; // 背景空白的时候的文案 - string backgroundText = 2; + string background_text = 2; // 有权限的tab栏的顺序 - repeated SearchItemType orderedType = 3; + repeated SearchItemType ordered_type = 3; } // 评论搜索插入项目-请求 @@ -554,7 +546,7 @@ message SearchItemReq { // message SearchItemReplyExtraInfo { // - string eventId = 1; + string event_id = 1; } // 评论搜索插入项目-回复 @@ -572,13 +564,13 @@ message SearchItemCursorReq { // 下一页 int64 next = 1; // tab类型 - SearchItemType itemType = 2; + SearchItemType item_type = 2; } // 评论搜索插入项目响应游标 message SearchItemCursorReply { // 是否有下一页 - bool hasNext = 1; + bool has_next = 1; // 下页 int64 next = 2; } @@ -632,7 +624,7 @@ message UGCVideoSearchItem { // 标题 string title = 1; // UP主昵称 - string upNickname = 2; + string up_nickname = 2; // 时长(单位为秒) int64 duration = 3; // 封面 @@ -654,7 +646,7 @@ message ArticleSearchItem { // 标题 string title = 1; // UP主昵称 - string upNickname = 2; + string up_nickname = 2; // 封面 repeated string covers = 3; } diff --git a/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto new file mode 100644 index 0000000..f7916d5 --- /dev/null +++ b/grpc_api/bilibili/pgc/gateway/player/v1/playurl.proto @@ -0,0 +1,262 @@ +syntax = "proto3"; + +package bilibili.pgc.gateway.player.v1; + +import "bilibili/app/playurl/v1/playurl.proto"; + +// PlayURL 播放地址 +service PlayURL { + // 播放页信息 + rpc PlayView (PlayViewReq) returns (PlayViewReply); + // 获取投屏地址 + rpc Project (ProjectReq) returns (ProjectReply); + // 直播播放页信息 + rpc LivePlayView (LivePlayViewReq) returns (LivePlayViewReply); +} + +// 播放页信息-请求 +message PlayViewReq { + // 剧集epid + int64 epid = 1; + // 视频cid + int64 cid = 2; + // 清晰度 + int64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 当前页spm + string spmid = 9; + // 上一页spm + string from_spmid = 10; + // 青少年模式 + int32 teenagers_mode = 11; + // 视频编码 + bilibili.app.playurl.v1.CodeType prefer_codec_type = 12; + // 是否强制请求预览视频 + bool is_preview = 13; + // 一起看房间id + int64 room_id = 14; +} + +// 投屏地址-请求 +message ProjectReq { + // 剧集epid + int64 ep_id = 1; + // 视频cid + int64 cid = 2; + // 清晰度 + int64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 forceHost = 7; + // 是否4K + bool fourk = 8; + // 当前页spm + string spmid = 9; + // 上一页spm + string fromSpmid = 10; + // 使用协议 + // 0:默认乐播 1:自建协议 2:云投屏 3:airplay + int32 protocol = 11; + // 投屏设备 + // 0:默认其他 1:OTT设备 + int32 device_type = 12; +} + +// 播放页信息-响应 +message PlayViewReply { + // 视频流信息 + bilibili.app.playurl.v1.VideoInfo video_info = 1; + // 播放控件用户自定义配置 + PlayAbilityConf play_conf = 2; + // 业务需要的其他信息 + BusinessInfo business = 3; + // 事件 + Event event = 4; +} + +// 事件 +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 RoomInfo { + // 房间长号 + int64 room_id = 1; + // 主播mid + int64 uid = 2; + // 状态相关 + RoomStatusInfo status = 3; + // 展示相关 + RoomShowInfo show = 4; +} + +// 房间信息-状态相关 +message RoomStatusInfo { + // 直播间状态 + // 0:未开播 1:直播中 2:轮播中 + int64 live_status = 1; + // 横竖屏方向 + // 0:横屏 1:竖屏 + int64 live_screen_type = 2; + // 是否开播过标识 + int64 live_mark = 3; + // 封禁状态 + // 0:未封禁 1:审核封禁 2:全网封禁 + int64 lock_status = 4; + // 封禁时间戳 + int64 lock_time = 5; + // 隐藏状态 + // 0:不隐藏 1:隐藏 + int64 hidden_status = 6; + // 隐藏时间戳 + int64 hidden_time = 7; + // 直播类型 + // 0:默认 1:摄像头直播 2;录屏直播 3:语音直播 + int64 live_type = 8; + // + int64 room_shield = 9; +} + +// 房间信息-展示相关 +message RoomShowInfo { + // 短号 + int64 short_id = 1; + // 人气值 + int64 popularity_count = 8; + // 最近一次开播时间戳 + int64 live_start_time = 10; +} + +// 播放信息 +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.proto b/grpc_api/bilibili/pgc/gateway/player/v2.proto deleted file mode 100644 index ab2a090..0000000 --- a/grpc_api/bilibili/pgc/gateway/player/v2.proto +++ /dev/null @@ -1,616 +0,0 @@ -syntax = "proto3"; - -package bilibili.pgc.gateway.player.v2; - -import "google/protobuf/timestamp.proto"; - -//播放url -service PlayURL { - //获取播放url - //https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView - rpc PlayView (PlayViewReq) returns (PlayViewReply); -} - -//获取播放url-请求 -message PlayViewReq{ - //目标剧集epid - int64 epid = 1; - - //目标视频cid - int64 cid = 2; - - //清晰度 - int64 qn = 3; - - //视频流版本 - int32 fnver = 4; - - //视频流功能 - int32 fnval = 5; - - //下载模式 - //0:播放 1:flv下载 2:dash下载 - uint32 download = 6; - - // - int32 forceHost = 7; - - //是否允许4K - bool fourk = 8; - - // - string spmid = 9; - - // - string fromSpmid = 10; - - // - int32 teenagersMode = 11; - - //编码类型 - CodeType codetype = 12; - - // - bool isPreview = 13; - - // - int64 roomId = 14; - - // - bool isNeedViewInfo = 15; -} - -//获取播放url-回复 -message PlayViewReply{ - //视频流信息 - VideoInfo info = 1; - - //用户播放界面配置 - PlayAbilityConf PlayConf = 2; - - // - PlayViewBusinessInfo Business = 3; - - // - Event event = 4; - - // - ViewInfo viewInfo = 5; -} - -//编码类型 -enum CodeType { - //默认 - NOCODE = 0; - - //H.264 - CODE264 = 1; - - //H.265 - CODE265 = 2; -} - -//不满足条件信息 -message Limit { - // - string title = 1; - - // - string uri = 2; - - // - string msg = 3; -} - -//流媒体元数据 -message streamInfo { - //清晰度 qn - uint32 quality = 1; - - //格式 - string format = 2; - - //格式描述 - string description = 3; - - //错误码 - uint32 errCode = 4; - - //不满足条件信息 - Limit limit = 5; - - //是否需要vip - bool needVip = 6; - - //是否需要登录 - bool needLogin = 7; - - //是否完整 - bool intact = 8; - - //是否非全二压 - bool noRexcode = 9; - - // - int64 attribute = 10; - - //新版格式描述 - string newDescription = 11; - - //格式文字 - string displayDesc = 12; - - //新版格式描述备注 - string superscript = 13; -} - -//dash视频流 -message DashVideo { - //主线流 - string baseUrl = 1; - - //备用流 - repeated string backupUrl = 2; - - //带宽 - uint32 bandwidth = 3; - - // - uint32 codecid = 4; - - //md5 - string md5 = 5; - - //大小 - uint64 size = 6; - - // - uint32 audioId = 7; - - //是否非全二压 - bool noRexcode = 8; -} - -//分段流条目 -message ResponseUrl { - //分段序号 - uint32 order = 1; - - //分段时长 - uint64 length = 2; - - //分段大小 - uint64 size = 3; - - //主线流 - string url = 4; - - //备用流 - repeated string backupUrl = 5; - - //md5 - string md5 = 6; -} - -//分段视频流 -message SegmentVideo { - //分段视频流列表 - repeated ResponseUrl segment = 1; -} - -//视频流信息 -message stream { - //元数据 - streamInfo info = 1; - - //dash流 - DashVideo dashvideo = 2; - - //分段流 - SegmentVideo segmentvideo = 3; -} - -//dash音频流 -message DashAudio { - //音质id - uint32 id = 1; - - //主线流 - string baseUrl = 2; - - //备用流 - repeated string backupUrl = 3; - - //带宽 - uint32 bandwidth = 4; - - // - uint32 codecid = 5; - - //md5 - string md5 = 6; - - //大小 - uint64 size = 7; -} - -//杜比音频信息 -message DolbyItem { - // - int32 type = 1; - - //音频流 - DashAudio audio = 2; -} - -//视频url信息 -message VideoInfo { - //视频清晰度 - uint32 quality = 1; - - //视频格式 - string format = 2; - - //视频时长 - uint64 timelength = 3; - - // - uint32 videoCodecid = 4; - - //视频流 - repeated stream streamList = 5; - - //伴音流 - repeated DashAudio audio = 6; - - //杜比伴音流 - DolbyItem dolby = 7; -} - -//禁用功能配置 -message PlayAbilityConf{ - //后台播放 - bool backgroundPlayDisable = 1; - - //镜像反转 - bool flipDisable = 2; - - //投屏 - bool castDisable = 3; - - //反馈 - bool feedbackDisable = 4; - - //字幕 - bool subtitleDisable = 5; - - //播放速度 - bool playbackRateDisable = 6; - - //定时停止 - bool timeUpDisable = 7; - - //播放方式 - bool playbackModeDisable = 8; - - //画面尺寸 - bool scaleModeDisable = 9; - - //赞 - bool likeDisable = 10; - - //踩 - bool dislikeDisable = 11; - - //投币 - bool coinDisable = 12; - - //充电 - bool elecDisable = 13; - - //分享 - bool shareDisable = 14; - - //截图 - bool screenShotDisable = 15; - - //锁定 - bool lockScreenDisable = 16; - - //相关推荐 - bool recommendDisable = 17; - - //播放速度 - bool playbackSpeedDisable = 18; - - //清晰度 - bool definitionDisable = 19; - - //选集 - bool selectionsDisable = 20; - - //下一集 - bool nextDisable = 21; - - //编辑弹幕 - bool editDmDisable = 22; - - //小窗 - bool smallWindowDisable = 23; - - //震动 - bool shakeDisable = 24; - - // - bool outerDmDisable = 25; - - // - bool innerDmDisable = 26; - - // - bool freyaEnterDisable = 27; - - //杜比音效 - bool dolbyDisable = 28; -} - -// -message PlayViewBusinessInfo { - // - bool isPreview = 1; - - // - bool bp = 2; - - // - string marlinToken = 3; -} - -// -message Shake { - // - string file = 1; -} - -// -message Event { - // - Shake shake = 1; -} - -// -message Report { - // - string showEventId = 1; - - // - string clickEventId = 2; - - // - string extends = 3; -} - -// -message BadgeInfo { - // - string text = 1; - - // - string bgColor = 2; - - // - string bgColorNight = 3; -} - -// -message ButtonInfo { - // - string text = 1; - - // - string textColor = 2; - - // - string textColorNight = 3; - - // - string bgColor = 4; - - // - string bgColorNight = 5; - - // - string link = 6; - - // - string actionType = 7; - - // - BadgeInfo badgeInfo = 8; - - // - Report report = 9; -} - -// -message DialogConfig { - // - bool isShowCover = 1; - - // - bool isOrientationEnable = 2; - - // - bool isNestedScrollEnable = 3; - - // - bool isForceHalfscreenEnable = 4; -} - -// -message TextInfo { - // - string text = 1; - - // - string textColor = 2; - - // - string textColorNight = 3; -} - -// -message ImageInfo { - // - string url = 1; -} - -// -message Dialog { - // - int64 code = 1; - - // - string msg = 2; - - // - string type = 3; - - // - string styleType = 4; - - // - DialogConfig config = 5; - - // - TextInfo title = 6; - - // - TextInfo subtitle = 7; - - // - ImageInfo image = 8; - - // - repeated ButtonInfo button = 9; - - // - ButtonInfo bottomDesc = 10; - - // - Report report = 11; - - // - int32 countDownSec = 12; -} - -// -message Toast { - // - string text = 1; - - // - ButtonInfo button = 2; -} - -// -message CouponTextInfo { - // - string positivePreview = 1; - - // - string section = 2; -} - -// -message CouponToast { - // - CouponTextInfo textInfo = 1; - - // - ButtonInfo button = 2; -} - -// -message Coupon { - // - string couponToken = 1; - - // - int64 type = 2; - - // - string value = 3; - - // - string useDesc = 4; - - // - string title = 5; - - // - string desc = 6; - - // - string payButtonText = 7; - - // - string payButtonTextLineThrough = 8; - - // - string realAmount = 9; - - // - google.protobuf.Timestamp expireTime = 10; -} - -// -message PopWin { - // - string title = 1; - - // - repeated Coupon coupon = 2; - - // - repeated ButtonInfo button = 3; - - // - string bottomText = 4; -} - -// -message CouponInfo { - // - CouponToast toast = 1; - - // - PopWin popWin = 2; -} - -// -message EndPage { - // - Dialog dialog = 1; - - // - bool hide = 2; -} - -// -message ViewInfo { - // - Dialog dialog = 1; - - // - Toast toast = 2; - - // - CouponInfo couponInfo = 3; - - // - repeated int64 demandNoPayEpids = 4; - - // - EndPage endPage = 5; -} \ 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 new file mode 100644 index 0000000..c45b74f --- /dev/null +++ b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto @@ -0,0 +1,520 @@ +syntax = "proto3"; + +package bilibili.pgc.gateway.player.v2; + +import "google/protobuf/timestamp.proto"; + +// 视频url +service PlayURL { + // 播放页信息 + rpc PlayView (PlayViewReq) returns (PlayViewReply); +} + +// 编码类型 +enum CodeType { + NOCODE = 0; // 默认 + CODE264 = 1; // H.264 + CODE265 = 2; // H.265 +} + +// 错误码 +enum PlayErr { + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 +} + +// 清晰度不满足条件信息 +message StreamLimit { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; +} + +// 播放页信息-请求 +message PlayViewReq { + // 剧集epid + int64 epid = 1; + // 视频cid + int64 cid = 2; + // 清晰度 + int64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 当前页spm + string spmid = 9; + // 上一页spm + string from_spmid = 10; + // 青少年模式 + int32 teenagers_mode = 11; + // 视频编码 + CodeType prefer_codec_type = 12; + // 是否强制请求预览视频 + bool is_preview = 13; + // 一起看房间id + int64 room_id = 14; + // 是否需要展示信息 + 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; +} + +// 播放结束页 +message EndPage { + // 鉴权浮层 + Dialog dialog = 1; + // 播放完后是否隐藏end_page + bool hide = 2; +} + +// 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 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 Report { + // 曝光事件 + string show_event_id = 1; + // 点击事件 + string click_event_id = 2; + // 埋点透传参数 + 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 { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + +// 流媒体元数据 +message StreamInfo { + // 清晰度 + uint32 quality = 1; + // 格式 + string format = 2; + // 格式描述 + string description = 3; + // 错误码 + uint32 err_code = 4; + // 不满足条件信息 + StreamLimit limit = 5; + // 是否需要vip + bool need_vip = 6; + // 是否需要登录 + bool need_login = 7; + // 是否完整 + bool intact = 8; + // 是否非全二压 + bool no_rexcode = 9; + // 清晰度属性位 + int64 attribute = 10; + // 新版格式描述 + string new_description = 11; + // 格式文字 + string display_desc = 12; + // 新版格式描述备注 + 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 { + // 弹窗标题 老字段 + 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; +} + +// 优惠券 +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 CouponToast { + // 提示框文案信息 + CouponTextInfo text_info = 1; + // 提示框按钮 + ButtonInfo button = 2; +} + +// 提示框文案信息 +message CouponTextInfo { + // 提示框文案-播正片6分钟预览 + string positive_preview = 1; + // 提示框文案-播非正片分节ep + string section = 2; +} + +// 禁用功能配置 +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; +} \ No newline at end of file diff --git a/grpc_api/bilibili/pgc/service/premiere/v1/premiere.proto b/grpc_api/bilibili/pgc/service/premiere/v1/premiere.proto new file mode 100644 index 0000000..cade7e0 --- /dev/null +++ b/grpc_api/bilibili/pgc/service/premiere/v1/premiere.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package bilibili.pgc.service.premiere.v1; + +// 首播服务 +service Premiere { + // 获取首播状态 + rpc Status (PremiereStatusReq) returns (PremiereStatusReply); +} + +// 获取首播状态-请求 +message PremiereStatusReq { + // 剧集epid + int64 ep_id = 1; +} + +// 获取首播状态-响应 +message PremiereStatusReply { + // 服务端播放进度 单位ms 用户实际播放进度:progress - delay_time + int64 progress = 1; + // 起播时间戳 单位ms + int64 start_time = 2; + // 延迟播放时长 单位ms + int64 delay_time = 3; + // 首播在线人数 + int64 online_count = 4; + // 首播状态 + // 1:预热 2:首播中 3:紧急停播 4:已结束 + int32 status = 5; + // 首播结束后跳转类型 + // 1:下架 2:转点播 + int32 after_premiere_type = 6; +} \ No newline at end of file