add: grpc proto distribution (#646)

This commit is contained in:
陈寒彤 2023-03-29 20:21:48 -06:00 committed by GitHub
parent 65da316b48
commit fcbbdfe125
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 434 additions and 0 deletions

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package bilibili.app.distribution.setting.download;
import "bilibili/app/distribution/v1/distribution.proto";
//
message DownloadSettingsConfig {
//
bilibili.app.distribution.v1.BoolValue enable_download_auto_start = 1;
}

View File

@ -0,0 +1,17 @@
syntax = "proto3";
package bilibili.app.distribution.setting.dynamic;
import "bilibili/app/distribution/v1/distribution.proto";
//
message DynamicAutoPlay {
//
bilibili.app.distribution.v1.Int64Value value = 1;
}
//
message DynamicDeviceConfig {
//
DynamicAutoPlay auto_play = 1;
}

View File

@ -0,0 +1,65 @@
syntax = "proto3";
package bilibili.app.distribution.setting.experimental;
import "bilibili/app/distribution/v1/distribution.proto";
//
message DynamicSelect {
//
bilibili.app.distribution.v1.BoolValue fold = 1;
}
//
message Exp {
//
bilibili.app.distribution.v1.Int64Value id = 1;
//
bilibili.app.distribution.v1.Int32Value bucket = 2;
}
//
message ExperimentalConfig {
//
bilibili.app.distribution.v1.StringValue flag = 1;
//
repeated Exp exps = 2;
}
//
message MultipleTusConfig {
//
TopLeft top_left = 1;
//
DynamicSelect dynamic_select = 2;
}
// APP首页头像跳转信息
message TopLeft {
//
bilibili.app.distribution.v1.StringValue url = 1;
//
bilibili.app.distribution.v1.StringValue story_foreground_image = 2;
//
bilibili.app.distribution.v1.StringValue story_background_image = 3;
//
bilibili.app.distribution.v1.StringValue listen_foreground_image = 4;
//
bilibili.app.distribution.v1.StringValue listen_background_image = 5;
//
bilibili.app.distribution.v1.StringValue ios_story_foreground_image = 6;
//
bilibili.app.distribution.v1.StringValue ios_story_background_image = 7;
//
bilibili.app.distribution.v1.StringValue ios_listen_foreground_image = 8;
//
bilibili.app.distribution.v1.StringValue ios_listen_background_image = 9;
//
bilibili.app.distribution.v1.StringValue goto = 10;
//
bilibili.app.distribution.v1.StringValue url_v2 = 11;
//
bilibili.app.distribution.v1.Int64Value goto_v2 = 12;
//
bilibili.app.distribution.v1.StringValue badge = 13;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package bilibili.app.distribution.setting.internaldevice;
import "bilibili/app/distribution/v1/distribution.proto";
//
message InternalDeviceConfig {
//
bilibili.app.distribution.v1.Int64Value fts = 1;
}

View File

@ -0,0 +1,11 @@
syntax = "proto3";
package bilibili.app.distribution.setting.night;
import "bilibili/app/distribution/v1/distribution.proto";
//
message NightSettingsConfig {
//
bilibili.app.distribution.v1.BoolValue is_night_follow_system = 1;
}

View File

@ -0,0 +1,25 @@
syntax = "proto3";
package bilibili.app.distribution.setting.other;
import "bilibili/app/distribution/v1/distribution.proto";
//
message OtherSettingsConfig {
//
bilibili.app.distribution.v1.Int64Value watermark_type = 1;
//
bilibili.app.distribution.v1.Int64Value web_image_quality_type = 2;
//
bilibili.app.distribution.v1.BoolValue enable_read_pasteboard = 3;
//
bilibili.app.distribution.v1.BoolValue paste_auto_jump = 4;
//
bilibili.app.distribution.v1.BoolValue mini_screen_play_when_back = 5;
//
bilibili.app.distribution.v1.BoolValue enable_resume_playing = 6;
//
bilibili.app.distribution.v1.BoolValue enable_wifi_auto_update = 7;
//
bilibili.app.distribution.v1.BoolValue enable_guide_screenshot_share = 8;
}

View File

@ -0,0 +1,41 @@
syntax = "proto3";
package bilibili.app.distribution.setting.pegasus;
import "bilibili/app/distribution/v1/distribution.proto";
//
message FeedModeValue {
//
bilibili.app.distribution.v1.Int64Value value = 1;
}
//
message PegasusAutoPlay {
//
bilibili.app.distribution.v1.Int64Value single = 1;
//
bilibili.app.distribution.v1.Int64Value double = 2;
//
bilibili.app.distribution.v1.BoolValue single_affected_by_server_side = 3;
//
bilibili.app.distribution.v1.BoolValue double_affected_by_server_side = 4;
}
//
message PegasusColumnValue {
//
bilibili.app.distribution.v1.Int64Value value = 1;
//
bilibili.app.distribution.v1.BoolValue affected_by_server_side = 2;
}
//
message PegasusDeviceConfig {
//
PegasusColumnValue column = 1;
//
FeedModeValue mode = 2;
//
PegasusAutoPlay auto_play = 3;
}

View File

@ -0,0 +1,58 @@
syntax = "proto3";
package bilibili.app.distribution.setting.play;
import "bilibili/app/distribution/v1/distribution.proto";
//
message CloudPlayConfig {
//
bilibili.app.distribution.v1.BoolValue enable_panorama = 1;
//
bilibili.app.distribution.v1.BoolValue enable_dolby = 2;
//
bilibili.app.distribution.v1.BoolValue enable_shake = 3;
//
bilibili.app.distribution.v1.BoolValue enable_background = 4;
// HIRES
bilibili.app.distribution.v1.BoolValue enable_loss_less = 5;
}
//
message PlayConfig {
//
bilibili.app.distribution.v1.BoolValue should_auto_play = 1;
//
bilibili.app.distribution.v1.BoolValue should_auto_fullscreen = 2;
//
bilibili.app.distribution.v1.BoolValue enable_playurl_https = 3;
//
bilibili.app.distribution.v1.BoolValue enable_danmaku_interaction = 4;
//
bilibili.app.distribution.v1.Int64Value small_screen_status = 5;
//
bilibili.app.distribution.v1.Int64Value player_codec_mode_key = 6;
//
bilibili.app.distribution.v1.BoolValue enable_gravity_rotate_screen = 7;
//
bilibili.app.distribution.v1.BoolValue enable_danmaku_monospaced = 8;
//
bilibili.app.distribution.v1.BoolValue enable_edit_subtitle = 9;
//
bilibili.app.distribution.v1.BoolValue enable_subtitle = 10;
//
bilibili.app.distribution.v1.Int64Value color_filter = 11;
//
bilibili.app.distribution.v1.BoolValue should_auto_story = 12;
//
bilibili.app.distribution.v1.BoolValue landscape_auto_story = 13;
//
bilibili.app.distribution.v1.BoolValue volume_balance = 14;
}
//
message SpecificPlayConfig {
//
bilibili.app.distribution.v1.BoolValue enable_segmented_section = 1;
}

View File

@ -0,0 +1,20 @@
syntax = "proto3";
package bilibili.app.distribution.setting.privacy;
import "bilibili/app/distribution/v1/distribution.proto";
//
message MidPrivacySettingsConfig {
//
bilibili.app.distribution.v1.BoolValue recommend_to_known = 1;
}
//
message PrivacySettingsConfig {
//
bilibili.app.distribution.v1.BoolValue ad_recommand_store = 1;
//
bilibili.app.distribution.v1.BoolValue sensor_access = 2;
}

View File

@ -0,0 +1,19 @@
syntax = "proto3";
package bilibili.app.distribution.setting.search;
import "bilibili/app/distribution/v1/distribution.proto";
//
message SearchAutoPlay {
//
bilibili.app.distribution.v1.Int64Value value = 1;
//
bilibili.app.distribution.v1.BoolValue affected_by_server_side = 2;
}
//
message SearchDeviceConfig {
//
SearchAutoPlay auto_play = 1;
}

View File

@ -0,0 +1,156 @@
syntax = "proto3";
package bilibili.app.distribution.v1;
// APP配置
service Distribution {
//
rpc GetUserPreference (GetUserPreferenceReq) returns (GetUserPreferenceReply);
//
rpc SetUserPreference (SetUserPreferenceReq) returns (SetUserPreferenceReply);
//
rpc UserPreference (UserPreferenceReq) returns (UserPreferenceReply);
}
//
message GetUserPreferenceReq {
//
repeated string type_url = 1;
//
map<string, string> extra_context = 2;
}
//
message GetUserPreferenceReply {
// GetUserPreferenceReq
repeated google.protobuf.Any value = 1;
}
//
message SetUserPreferenceReq {
//
repeated google.protobuf.Any preference = 1;
//
map<string, string> extra_context = 2;
}
//
message SetUserPreferenceReply {}
//
message UserPreferenceReq {}
//
message UserPreferenceReply {
// type_url
repeated google.protobuf.Any preference = 1;
}
//
message BoolValue {
//
bool value = 1;
//
int64 last_modified = 2;
//
bool default_value = 3;
//
string exp = 4;
}
//
message BytesValue {
//
bytes value = 1;
//
int64 last_modified = 2;
//
bytes default_value = 3;
//
string exp = 4;
}
//
message DoubleValue {
//
double value = 1;
//
int64 last_modified = 2;
//
double default_value = 3;
//
string exp = 4;
}
//
message FloatValue {
//
float value = 1;
//
int64 last_modified = 2;
//
float default_value = 3;
//
string exp = 4;
}
//
message Int32Value {
//
int32 value = 1;
//
int64 last_modified = 2;
//
int32 default_value = 3;
//
string exp = 4;
}
//
message Int64Value {
//
int64 value = 1;
//
int64 last_modified = 2;
//
int64 default_value = 3;
//
string exp = 4;
}
//
message StringValue {
//
string value = 1;
//
int64 last_modified = 2;
//
string default_value = 3;
//
string exp = 4;
}
//
message UInt32Value {
//
uint32 value = 1;
//
int64 last_modified = 2;
//
uint32 default_value = 3;
//
string exp = 4;
}
//
message UInt64Value {
//
uint64 value = 1;
//
int64 last_modified = 2;
//
uint64 default_value = 3;
//
string exp = 4;
}