refactor: workspace setting definitions

This commit is contained in:
Steven
2024-07-29 22:03:21 +08:00
parent 61d01a53eb
commit ecf77e0774
36 changed files with 1277 additions and 1052 deletions

View File

@ -25,15 +25,26 @@ service UserSettingService {
}
message UserSetting {
// id is the user id.
int32 id = 1;
int32 user_id = 1;
UserSettingGeneral general = 2;
}
GeneralSetting general = 2;
message UserSettingGeneral {
string locale = 1;
string color_theme = 2;
AccessTokensSetting access_tokens = 3;
message GeneralSetting {
string locale = 1;
string color_theme = 2;
}
message AccessTokensSetting {
message AccessToken {
// The access token is a JWT token, including expiration time, issuer, etc.
string access_token = 1;
// A description for the access token.
string description = 2;
}
repeated AccessToken access_tokens = 1; // Nested repeated field
}
}
message GetUserSettingRequest {

View File

@ -37,25 +37,16 @@ message WorkspaceProfile {
bool enable_signup = 4;
// The custom style.
string custom_style = 5;
// The url of custom favicon provider.
string favicon_provider = 7;
// The owner name.
// Format: "users/{id}"
string owner = 8;
string owner = 6;
}
message WorkspaceSetting {
string license_key = 1;
// Whether to enable other users to sign up.
bool enable_signup = 2;
// The instance URL.
string instance_url = 3;
// The custom style.
string custom_style = 4;
string custom_style = 1;
// The default visibility of shortcuts and collections.
Visibility default_visibility = 7;
// The url of custom favicon provider.
string favicon_provider = 8;
Visibility default_visibility = 2;
}
message GetWorkspaceProfileRequest {}