更新gRPC proto定义

This commit is contained in:
SocialSisterYi 2023-07-11 22:36:38 +08:00
parent 47a157e08b
commit aa233779e1
No known key found for this signature in database
GPG Key ID: 4359DB0F41BEEBBA
4 changed files with 321 additions and 2 deletions

View File

@ -785,6 +785,16 @@ message CampusHomePagesReq {
int32 page_type = 6;
}
//
enum CampusRcmdReqFrom {
CAMPUS_RCMD_FROM_UNKNOWN = 0;
CAMPUS_RCMD_FROM_HOME_UN_OPEN = 1;
CAMPUS_RCMD_FROM_VISIT_OTHER = 2;
CAMPUS_RCMD_FROM_HOME_MOMENT = 3;
CAMPUS_RCMD_FROM_DYN_MOMENT = 4;
CAMPUS_RCMD_FROM_PAGE_SUBORDINATE_MOMENT = 5;
}
//
enum CampusHomePageType {
//

View File

@ -1 +1,108 @@
// TODO
syntax = "proto3";
package bilibili.dagw.component.avatar.common;
//
message BasicRenderSpec {
//
double opacity = 1;
}
//
message ColorConfig {
//
bool is_dark_mode_aware = 1;
//
ColorSpec day = 2;
//
ColorSpec night = 3;
}
//
message ColorSpec {
//
string argb = 1;
}
//
message LayerGeneralSpec {
//
PositionSpec pos_spec = 1;
//
SizeSpec size_spec = 2;
//
BasicRenderSpec render_spec = 3;
}
//
message MaskProperty {
//
LayerGeneralSpec general_spec = 1;
//
ResourceSource mask_src = 2;
}
//
message NativeDrawRes {
//
int32 draw_type = 1;
//
int32 fill_mode = 2;
//
ColorConfig color_config = 3;
//
double edge_weight = 4;
}
//
message PositionSpec {
//
int32 coordinate_pos = 1;
//
double axis_x = 2;
//
double axis_y = 3;
}
//
message RemoteRes {
//
string url = 1;
//
string bfs_style = 2;
}
//
message ResourceSource {
//
enum LocalRes {
LOCAL_RES_INVALID = 0;
LOCAL_RES_ICON_VIP = 1;
LOCAL_RES_ICON_SMALL_VIP = 2;
LOCAL_RES_ICON_PERSONAL_VERIFY = 3;
LOCAL_RES_ICON_ENTERPRISE_VERIFY = 4;
LOCAL_RES_ICON_NFT_MAINLAND = 5;
LOCAL_RES_DEFAULT_AVATAR = 6;
}
//
int32 src_type = 1;
//
int32 placeholder = 2;
//
oneof res {
//
RemoteRes remote = 3;
//
LocalRes local = 4;
//
NativeDrawRes draw = 5;
}
}
//
message SizeSpec {
//
double width = 1;
//
double height = 2;
}

View File

@ -1 +1,112 @@
// TODO
syntax = "proto3";
package bilibili.dagw.component.avatar.v1;
import "bilibili/dagw/component/avatar/common/common.proto";
import "bilibili/dagw/component/avatar/v1/plugin.proto";
//
message AvatarItem {
//
bilibili.dagw.component.avatar.common.SizeSpec container_size = 1;
//
repeated LayerGroup layers = 2;
//
LayerGroup fallback_layers = 3;
//
int64 mid = 4;
}
//
message BasicLayerResource {
//
int32 res_type = 1;
//
oneof payload {
//
ResImage res_image = 2;
//
ResAnimation res_animation = 3;
///
ResNativeDraw res_native_draw = 4;
};
}
//
message GeneralConfig {
//
map<string, string> web_css_style = 1;
}
//
message Layer {
//
string layer_id = 1;
//
bool visible = 2;
//
LayerGeneralSpec general_spec = 3;
//
LayerConfig layer_config = 4;
//
BasicLayerResource resource = 5;
}
//
message LayerConfig {
//
map<string, LayerTagConfig> tags = 1;
//
bool is_critical = 2;
//
bool allow_over_paint = 3;
//
MaskProperty layer_mask = 4;
}
//
message LayerGroup {
//
string group_id = 1;
//
repeated Layer layers = 2;
//
MaskProperty group_mask = 3;
//
bool is_critical_group = 4;
}
//
message LayerTagConfig {
//
int32 config_type = 1;
//
oneof config {
//
GeneralConfig general_config = 2;
//
bilibili.dagw.component.avatar.v1.plugin.GyroConfig gyro_config = 3;
//
bilibili.dagw.component.avatar.v1.plugin.CommentDoubleClickConfig comment_doubleClick_config = 4;
//
bilibili.dagw.component.avatar.v1.plugin.LiveAnimeConfig live_anime_config = 5;
};
}
//
message ResAnimation {
//
ResourceSource webp_src = 1;
}
//
message ResImage {
//
ResourceSource image_src = 1;
}
//
message ResNativeDraw {
//
ResourceSource draw_src = 1;
}

View File

@ -0,0 +1,91 @@
syntax = "proto3";
package bilibili.dagw.component.avatar.v1.plugin;
//
message CommentDoubleClickConfig {
//
Interaction interaction = 1;
//
double animation_scale = 2;
}
//
message GyroConfig {
//
NFTImageV2 gyroscope = 1;
}
//
message GyroscopeContentV2 {
//
string file_url = 1;
//
float scale = 2;
//
repeated PhysicalOrientationV2 physical_orientation = 3;
}
//
message GyroscopeEntityV2 {
//
string display_type = 1;
//
repeated GyroscopeContentV2 contents = 2;
}
//
message Interaction {
//
string nft_id = 1;
//
bool enabled = 2;
//
string itype = 3;
//
string metadata_url = 4;
}
//
message LiveAnimeConfig {
//
bool is_live = 1;
}
//
message LiveAnimeItem {
//
ColorConfig color = 1;
//
double start_ratio = 2;
//
double end_ratio = 3;
//
double start_stroke = 4;
//
double start_opacity = 5;
//
int64 phase = 6;
}
//
message NFTImageV2 {
//
repeated GyroscopeEntityV2 gyroscope = 1;
}
//
message PhysicalOrientationAnimation {
//
string type = 1;
//
string bezier = 3;
}
//
message PhysicalOrientationV2 {
//
string type = 1;
//
repeated PhysicalOrientationAnimation animations = 3;
}