2023-09-14 14:18:54 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package memos.store;
|
|
|
|
|
|
|
|
option go_package = "gen/store";
|
|
|
|
|
|
|
|
enum UserSettingKey {
|
|
|
|
USER_SETTING_KEY_UNSPECIFIED = 0;
|
2023-09-14 15:16:17 +03:00
|
|
|
// Access tokens for the user.
|
2024-05-13 15:03:04 +03:00
|
|
|
ACCESS_TOKENS = 1;
|
2023-11-30 18:08:54 +03:00
|
|
|
// The locale of the user.
|
2024-05-13 15:03:04 +03:00
|
|
|
LOCALE = 2;
|
2023-11-30 18:08:54 +03:00
|
|
|
// The appearance of the user.
|
2024-05-13 15:03:04 +03:00
|
|
|
APPEARANCE = 3;
|
2023-11-30 18:08:54 +03:00
|
|
|
// The visibility of the memo.
|
2024-05-13 15:03:04 +03:00
|
|
|
MEMO_VISIBILITY = 4;
|
2023-09-14 14:18:54 +03:00
|
|
|
}
|
|
|
|
|
2024-02-20 18:02:01 +03:00
|
|
|
message UserSetting {
|
|
|
|
int32 user_id = 1;
|
|
|
|
UserSettingKey key = 2;
|
|
|
|
oneof value {
|
|
|
|
AccessTokensUserSetting access_tokens = 3;
|
|
|
|
string locale = 4;
|
|
|
|
string appearance = 5;
|
|
|
|
string memo_visibility = 6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-14 14:18:54 +03:00
|
|
|
message AccessTokensUserSetting {
|
|
|
|
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;
|
|
|
|
}
|